1
0
Fork 0
mirror of https://github.com/gohugoio/hugo.git synced 2025-04-11 05:45:53 +00:00

Do not attempt to build if there is no config file

Fixes 
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