mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-07 20:30:36 -05:00
commands: Fix panic on invalid config in "hugo mod get" and similar
Fixes #8773
This commit is contained in:
parent
d831d2fce8
commit
351ed0f569
1 changed files with 1 additions and 1 deletions
|
@ -308,7 +308,7 @@ func (c *commandeer) loadConfig(mustHaveConfigFile, running bool) error {
|
|||
cfgSetAndInit,
|
||||
doWithConfig)
|
||||
|
||||
if err != nil && mustHaveConfigFile {
|
||||
if err != nil {
|
||||
return err
|
||||
} else if mustHaveConfigFile && len(configFiles) == 0 {
|
||||
return hugolib.ErrNoConfigFile
|
||||
|
|
Loading…
Reference in a new issue