aboutsummaryrefslogtreecommitdiffhomepage
path: root/main_test.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2023-05-28 11:35:00 +0200
committerBjørn Erik Pedersen <[email protected]>2023-05-28 12:55:44 +0200
commitfd099331ec82c21e1fd7ee1cdb9630b820714643 (patch)
treeb4280f2b8dac094f6b0d6c9099df571b1241b0e6 /main_test.go
parent43f1282e734f5a27f99ff6efb29190a234b3447a (diff)
downloadhugo-fd099331ec82c21e1fd7ee1cdb9630b820714643.tar.gz
hugo-fd099331ec82c21e1fd7ee1cdb9630b820714643.zip
Fix Processed images count regression for multiple languages
Fixes #11002
Diffstat (limited to 'main_test.go')
-rw-r--r--main_test.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/main_test.go b/main_test.go
index 73b9a0838..5629db3fe 100644
--- a/main_test.go
+++ b/main_test.go
@@ -370,12 +370,15 @@ var commonTestScriptsParam = testscript.Params{
}
func testSetupFunc() func(env *testscript.Env) error {
+ sourceDir, _ := os.Getwd()
return func(env *testscript.Env) error {
var keyVals []string
keyVals = append(keyVals, "HUGO_TESTRUN", "true")
hugoCachedDir := filepath.Join(env.WorkDir, "hugocache")
keyVals = append(keyVals, "HUGO_CACHEDIR", hugoCachedDir)
+ keyVals = append(keyVals, "SOURCE", sourceDir)
+
goVersion := runtime.Version()
// Strip all but the major and minor version.
goVersion = regexp.MustCompile(`^go(\d+\.\d+)`).FindStringSubmatch(goVersion)[1]