summaryrefslogtreecommitdiff
path: root/cmd/ponzu/usage.go
diff options
context:
space:
mode:
authorSteve Manuel <nilslice@gmail.com>2017-03-01 11:33:33 -0800
committerSteve Manuel <nilslice@gmail.com>2017-03-01 11:33:33 -0800
commitad6220d2459e30569827b67e13921b0cd6257447 (patch)
tree4cfb0cd20661b7bdd3f84e402097bed544172c66 /cmd/ponzu/usage.go
parentd7f88d95435e1ffd216bc9b73f7d548cdb554982 (diff)
replace GOPATH env var lookups with getGOPATH func throughout codebase
Diffstat (limited to 'cmd/ponzu/usage.go')
-rw-r--r--cmd/ponzu/usage.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/cmd/ponzu/usage.go b/cmd/ponzu/usage.go
index fd289cf..939b0c0 100644
--- a/cmd/ponzu/usage.go
+++ b/cmd/ponzu/usage.go
@@ -4,7 +4,6 @@ import (
"encoding/json"
"fmt"
"io/ioutil"
- "os"
"path/filepath"
"time"
)
@@ -180,7 +179,10 @@ func ponzu(isCLI bool) (map[string]interface{}, error) {
info := filepath.Join("cmd", "ponzu", "ponzu.json")
if isCLI {
- gopath := os.Getenv("GOPATH")
+ gopath, err := getGOPATH()
+ if err != nil {
+ return nil, err
+ }
repo := filepath.Join(gopath, "src", "github.com", "ponzu-cms", "ponzu")
info = filepath.Join(repo, "cmd", "ponzu", "ponzu.json")
}