aboutsummaryrefslogtreecommitdiffhomepage
path: root/testscripts
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2023-05-27 16:07:56 +0200
committerBjørn Erik Pedersen <[email protected]>2023-05-27 16:56:54 +0200
commit273d9f69a6cb46ce632b340ebb1191e2e083323b (patch)
tree00c6ff81b1942e10f3aa9c06ca729317f55246bf /testscripts
parenta6257d8a44c85aa7485e5cff0376c19f4335f227 (diff)
downloadhugo-273d9f69a6cb46ce632b340ebb1191e2e083323b.tar.gz
hugo-273d9f69a6cb46ce632b340ebb1191e2e083323b.zip
commands: Fail the build when no config file or config dir
Fixes #11019
Diffstat (limited to 'testscripts')
-rw-r--r--testscripts/commands/hugo__configdir.txt6
-rw-r--r--testscripts/commands/hugo__flags.txt2
-rw-r--r--testscripts/commands/hugo__noconfig.txt4
3 files changed, 12 insertions, 0 deletions
diff --git a/testscripts/commands/hugo__configdir.txt b/testscripts/commands/hugo__configdir.txt
new file mode 100644
index 000000000..4da62ade5
--- /dev/null
+++ b/testscripts/commands/hugo__configdir.txt
@@ -0,0 +1,6 @@
+
+hugo
+! stderr .
+
+-- config/_default/hugo.toml --
+baseURL = "https://example.com/" \ No newline at end of file
diff --git a/testscripts/commands/hugo__flags.txt b/testscripts/commands/hugo__flags.txt
index c2ea92c95..ad4591322 100644
--- a/testscripts/commands/hugo__flags.txt
+++ b/testscripts/commands/hugo__flags.txt
@@ -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"]
diff --git a/testscripts/commands/hugo__noconfig.txt b/testscripts/commands/hugo__noconfig.txt
new file mode 100644
index 000000000..c3a6f6588
--- /dev/null
+++ b/testscripts/commands/hugo__noconfig.txt
@@ -0,0 +1,4 @@
+
+! hugo
+
+stderr 'Unable to locate config file or config directory' \ No newline at end of file