stop installing hugo. ask the user to do it

This commit is contained in:
Henrique Dias
2016-08-25 20:45:48 +01:00
parent f878cc3040
commit 629d2092a1
4 changed files with 7 additions and 194 deletions

View File

@@ -143,7 +143,13 @@ func parse(c *caddy.Controller, root string) (*Config, error) {
Root: "./",
}
conf.Hugo = getPath()
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)
}
for c.Next() {
args := c.RemainingArgs()