ref: 3bbd02a1ca4338dfe4cd1306ba14513e215b8a6d
parent: 469d268cc8b9d90192a51b6fb6877dcb38624686
author: Bjørn Erik Pedersen <[email protected]>
date: Wed Nov 11 17:47:09 EST 2015
Print parse errors from Viper
--- a/commands/hugo.go
+++ b/commands/hugo.go
@@ -185,7 +185,11 @@
}
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")