Skip to content

Commit

Permalink
Remove absolute path on knox binary (requiring the PATH variable to b…
Browse files Browse the repository at this point in the history
…e set accurately)
  • Loading branch information
devinlundberg committed May 5, 2016
1 parent b183289 commit c970770
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,10 @@ func NewMock(primary string, active []string) Client {

// Register registers the given keyName with knox. If the operation fails, it returns an error.
func Register(keyID string) ([]byte, error) {
if output, err := exec.Command("/usr/bin/knox", "register", "-k", keyID).CombinedOutput(); err != nil {
if output, err := exec.Command("knox", "register", "-k", keyID).CombinedOutput(); err != nil {
return nil, fmt.Errorf("error registering knox key: %s %v '%q'", keyID, err, output)
}
cmd := exec.Command("/usr/bin/knox", "get", "-j", keyID)
cmd := exec.Command("knox", "get", "-j", keyID)
host, err := os.Hostname()
if err != nil {
return nil, fmt.Errorf("No hostname found: %s", err.Error())
Expand Down

0 comments on commit c970770

Please sign in to comment.