diff --git a/insthugo/insthugo.go b/insthugo/insthugo.go index 3f7c24e7..19f68bfe 100644 --- a/insthugo/insthugo.go +++ b/insthugo/insthugo.go @@ -10,6 +10,7 @@ import ( "log" "net/http" "os" + "os/exec" "os/user" "path/filepath" "runtime" @@ -46,10 +47,10 @@ var ( func GetPath() string { initializeVariables() - /* // Check if Hugo is already on $PATH - if hugo, err := exec.LookPath("hugo"); err == nil { - return hugo - } */ + // Check if Hugo is already on $PATH + if hugo, err := exec.LookPath("hugo"); err == nil { + return hugo + } // Check if Hugo is on $HOME/.caddy/bin if _, err := os.Stat(hugo); err == nil {