commands: Fail the build when no config file or config dir

Fixes #11019
This commit is contained in:
Bjørn Erik Pedersen 2023-05-27 16:07:56 +02:00
parent a6257d8a44
commit 273d9f69a6
4 changed files with 16 additions and 0 deletions

View file

@ -0,0 +1,6 @@
hugo
! stderr .
-- config/_default/hugo.toml --
baseURL = "https://example.com/"

View file

@ -11,6 +11,8 @@ grep '<body>Home' newpublic/index.html
hugo --quiet
! stdout .
-- hugo.toml --
title = "Hugo Test"
-- myconfig.toml --
baseURL = "http://example.org/"
disableKinds = ["RSS", "sitemap", "robotsTXT", "404", "taxonomy", "term"]

View file

@ -0,0 +1,4 @@
! hugo
stderr 'Unable to locate config file or config directory'