mirror of
https://github.com/gohugoio/hugo.git
synced 2024-12-26 01:21:28 +00:00
Print parse errors from Viper
This commit is contained in:
parent
469d268cc8
commit
3bbd02a1ca
1 changed files with 5 additions and 1 deletions
|
@ -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")
|
||||
|
|
Loading…
Reference in a new issue