mirror of
https://github.com/gohugoio/hugo.git
synced 2025-09-13 14:46:58 -04:00
commands: Fix panic on invalid config in "hugo mod get" and similar
Fixes #8773
This commit is contained in:
parent
d831d2fce8
commit
351ed0f569
@ -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…
x
Reference in New Issue
Block a user