From e3fdadc2d484eaf8288d2e66e5e322d404c908c5 Mon Sep 17 00:00:00 2001 From: Henrique Dias Date: Thu, 25 Aug 2016 21:01:33 +0100 Subject: [PATCH] add error --- setup.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/setup.go b/setup.go index 0b85ba3e..193aeddb 100644 --- a/setup.go +++ b/setup.go @@ -1,6 +1,7 @@ package hugo import ( + "errors" "fmt" "io/ioutil" "log" @@ -147,8 +148,8 @@ func parse(c *caddy.Controller, root string) (*Config, error) { 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) + fmt.Println("It seems that you don't have 'hugo' on your PATH.") + return conf, errors.New("It seems that you don't have 'hugo' on your PATH.") } for c.Next() {