From: Nick Krichevsky Date: Tue, 15 Oct 2019 03:34:56 +0000 (-0400) Subject: Do not attempt to build if there is no config file X-Git-Tag: v0.59.1~9 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=e6aa6edb4c5f37feb1f2bb8c0f3f80933c7adf5f;p=brevno-suite%2Fhugo Do not attempt to build if there is no config file Fixes #5896 --- diff --git a/commands/commandeer.go b/commands/commandeer.go index 55526a85..b9e2ceef 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