From 9fd56bbb92850cdf7094ff399b5b37118fa08995 Mon Sep 17 00:00:00 2001 From: Henrique Dias Date: Thu, 25 Aug 2016 20:52:53 +0100 Subject: [PATCH] fix bugs --- setup.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/setup.go b/setup.go index 3ff26575..0b85ba3e 100644 --- a/setup.go +++ b/setup.go @@ -6,6 +6,7 @@ import ( "log" "net/http" "os" + "os/exec" "path/filepath" "reflect" "strings" @@ -143,8 +144,8 @@ func parse(c *caddy.Controller, root string) (*Config, error) { Root: "./", } - if hugo, err = exec.LookPath("hugo"); err == nil { - conf.Hugo = hugo; + if hugo, err := exec.LookPath("hugo"); err == nil { + conf.Hugo = hugo } else { fmt.Println("It seems that you don't have 'hugo' on your PATH.\nAborting...") os.Exit(0)