1
0
mirror of https://github.com/gohugoio/hugo.git synced 2024-05-11 05:54:58 +00:00

Do not attempt to build if there is no config file

Fixes #5896
This commit is contained in:
Nick Krichevsky
2019-10-14 23:34:56 -04:00
committed by Bjørn Erik Pedersen
parent 6bcc5ad8b2
commit e6aa6edb4c

View File

@@ -313,6 +313,8 @@ func (c *commandeer) loadConfig(mustHaveConfigFile, running bool) error {
return err
}
} else if mustHaveConfigFile && len(configFiles) == 0 {
return hugolib.ErrNoConfigFile
}
c.configFiles = configFiles