mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-11 20:03:58 +02:00
commands: Fail the build when no config file or config dir
Fixes #11019
This commit is contained in:
6
testscripts/commands/hugo__configdir.txt
Normal file
6
testscripts/commands/hugo__configdir.txt
Normal file
@@ -0,0 +1,6 @@
|
||||
|
||||
hugo
|
||||
! stderr .
|
||||
|
||||
-- config/_default/hugo.toml --
|
||||
baseURL = "https://example.com/"
|
@@ -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"]
|
||||
|
4
testscripts/commands/hugo__noconfig.txt
Normal file
4
testscripts/commands/hugo__noconfig.txt
Normal file
@@ -0,0 +1,4 @@
|
||||
|
||||
! hugo
|
||||
|
||||
stderr 'Unable to locate config file or config directory'
|
Reference in New Issue
Block a user