From e6aa6edb4c5f37feb1f2bb8c0f3f80933c7adf5f Mon Sep 17 00:00:00 2001 From: Nick Krichevsky Date: Mon, 14 Oct 2019 23:34:56 -0400 Subject: [PATCH] Do not attempt to build if there is no config file Fixes #5896 --- commands/commandeer.go | 2 ++ 1 file changed, 2 insertions(+) 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