aboutsummaryrefslogtreecommitdiffhomepage
path: root/main_test.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2023-05-28 10:07:03 +0200
committerBjørn Erik Pedersen <[email protected]>2023-05-28 12:55:44 +0200
commite96cdfe9664cb38c3e16cc00cc630cf6f258d547 (patch)
treed3edecddc0b6a465fecf1d2b60a391236c541e0b /main_test.go
parentffdbce5787a45e8537b7a77515ca06e4deee2504 (diff)
downloadhugo-e96cdfe9664cb38c3e16cc00cc630cf6f258d547.tar.gz
hugo-e96cdfe9664cb38c3e16cc00cc630cf6f258d547.zip
Don't create the public folder unless needed
Fixes #11031
Diffstat (limited to 'main_test.go')
-rw-r--r--main_test.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/main_test.go b/main_test.go
index ffd700d57..73b9a0838 100644
--- a/main_test.go
+++ b/main_test.go
@@ -132,6 +132,11 @@ var commonTestScriptsParam = testscript.Params{
if err != nil {
ts.Fatalf("%v", err)
}
+ if len(fis) == 0 {
+ // To simplify empty dir checks.
+ fmt.Fprintln(ts.Stdout(), "Empty dir")
+ return
+ }
for _, fi := range fis {
fmt.Fprintf(ts.Stdout(), "%s %04o %s %s\n", fi.Mode(), fi.Mode().Perm(), fi.ModTime().Format(time.RFC3339Nano), fi.Name())
}