Skip to content

Commit

Permalink
Do not attempt to build if there is no config file
Browse files Browse the repository at this point in the history
Fixes #5896
  • Loading branch information
ollien authored and bep committed Oct 21, 2019
1 parent 6bcc5ad commit e6aa6ed
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions commands/commandeer.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e6aa6ed

Please sign in to comment.