commands: Fix config environment handling

Fixes #6503
Fixes #6824
This commit is contained in:
Bjørn Erik Pedersen 2020-01-31 09:09:11 +01:00
parent 0792cfa9fa
commit 2bbc865f7b
13 changed files with 211 additions and 204 deletions

View file

@ -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})