Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2022-05-27 14:23:37 +0300
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2022-05-27 20:11:16 +0300
commitdd9eaf19fdeb37ce5861405beceaf018faac6386 (patch)
tree66fb496dc02dab4af49e924af1dce1d7e6df06ee /hugolib
parent46a2ea6d0d3aba04213362fc72f5a3a28e3c3404 (diff)
Don't use the baseURL /path as part of the resource cache key
As that prevents Hugo projects with sub paths in their `baseURL` to use themes with cached resources. Fixes #9787
Diffstat (limited to 'hugolib')
-rw-r--r--hugolib/integrationtest_builder.go16
1 files changed, 9 insertions, 7 deletions
diff --git a/hugolib/integrationtest_builder.go b/hugolib/integrationtest_builder.go
index 0ec202f89..df51b37c3 100644
--- a/hugolib/integrationtest_builder.go
+++ b/hugolib/integrationtest_builder.go
@@ -41,13 +41,15 @@ func NewIntegrationTestBuilder(conf IntegrationTestConfig) *IntegrationTestBuild
}
if conf.NeedsOsFS {
- tempDir, clean, err := htesting.CreateTempDir(hugofs.Os, "hugo-integration-test")
- c.Assert(err, qt.IsNil)
- conf.WorkingDir = filepath.Join(tempDir, conf.WorkingDir)
- if !conf.PrintAndKeepTempDir {
- c.Cleanup(clean)
- } else {
- fmt.Println("\nUsing WorkingDir dir:", conf.WorkingDir)
+ if !filepath.IsAbs(conf.WorkingDir) {
+ tempDir, clean, err := htesting.CreateTempDir(hugofs.Os, "hugo-integration-test")
+ c.Assert(err, qt.IsNil)
+ conf.WorkingDir = filepath.Join(tempDir, conf.WorkingDir)
+ if !conf.PrintAndKeepTempDir {
+ c.Cleanup(clean)
+ } else {
+ fmt.Println("\nUsing WorkingDir dir:", conf.WorkingDir)
+ }
}
} else if conf.WorkingDir == "" {
conf.WorkingDir = helpers.FilePathSeparator