summaryrefslogtreecommitdiffstats
path: root/commands/hugo_test.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2020-01-31 09:09:11 +0100
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2020-01-31 16:36:36 +0100
commit2bbc865f7bb713b2d0d2dbb02b90ae2621ad5367 (patch)
treecda2d88ec0079293780028d3f0fe699f839777e7 /commands/hugo_test.go
parent0792cfa9fae94a06a31e393a46fed3b1dd73b66a (diff)
commands: Fix config environment handling
Fixes #6503 Fixes #6824
Diffstat (limited to 'commands/hugo_test.go')
-rw-r--r--commands/hugo_test.go8
1 files changed, 2 insertions, 6 deletions
diff --git a/commands/hugo_test.go b/commands/hugo_test.go
index 6a666ff4a..65a0416c7 100644
--- a/commands/hugo_test.go
+++ b/commands/hugo_test.go
@@ -14,7 +14,6 @@
package commands
import (
- "os"
"testing"
qt "github.com/frankban/quicktest"
@@ -37,12 +36,9 @@ title = "Hugo Commands"
contentDir = "thisdoesnotexist"
`
- dir, err := createSimpleTestSite(t, testSiteConfig{configTOML: cfgStr, contentDir: contentDir})
+ dir, clean, err := createSimpleTestSite(t, testSiteConfig{configTOML: cfgStr, contentDir: contentDir})
c.Assert(err, qt.IsNil)
-
- defer func() {
- os.RemoveAll(dir)
- }()
+ defer clean()
cmd.SetArgs([]string{"-s=" + dir, "-c=" + contentDir})