Skip to content
Permalink
Browse files
commands: Fix panic on invalid config in "hugo mod get" and similar
Fixes #8773
  • Loading branch information
bep committed Jul 20, 2021
1 parent d831d2f commit 351ed0f569f96aff29b03925bf5154d80a164e00
Showing with 1 addition and 1 deletion.
  1. +1 −1 commands/commandeer.go
@@ -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

0 comments on commit 351ed0f

Please sign in to comment.