diff --git a/commands/commandeer.go b/commands/commandeer.go index 55526a857..b9e2ceef1 100644 --- a/commands/commandeer.go +++ b/commands/commandeer.go @@ -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