hugo

Unnamed repository; edit this file 'description' to name the repository.

git clone git://git.shimmy1996.com/hugo.git
commit 3bbd02a1ca4338dfe4cd1306ba14513e215b8a6d
parent 469d268cc8b9d90192a51b6fb6877dcb38624686
Author: Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Date:   Wed, 11 Nov 2015 22:47:09 +0100

Print parse errors from Viper

Diffstat:
Mcommands/hugo.go | 6+++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/commands/hugo.go b/commands/hugo.go
@@ -185,7 +185,11 @@ func InitializeConfig() {
 	}
 	err := viper.ReadInConfig()
 	if err != nil {
-		jww.ERROR.Println("Unable to locate Config file. Perhaps you need to create a new site. Run `hugo help new` for details")
+		if _, ok := err.(viper.ConfigParseError); ok {
+			jww.ERROR.Println(err)
+		} else {
+			jww.ERROR.Println("Unable to locate Config file. Perhaps you need to create a new site. Run `hugo help new` for details", err)
+		}
 	}
 
 	viper.RegisterAlias("indexes", "taxonomies")