From c970770d7f1861fad8fffe1335fa39e9875ed4a9 Mon Sep 17 00:00:00 2001 From: Devin Lundberg Date: Thu, 5 May 2016 09:27:54 -0500 Subject: [PATCH] Remove absolute path on knox binary (requiring the PATH variable to be set accurately) --- client.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client.go b/client.go index 9a471f6..2a5e771 100644 --- a/client.go +++ b/client.go @@ -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())