Skip to content

Commit 0b159f0

Browse files
committed
OS fs
1 parent e10cb6b commit 0b159f0

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

‎hugofs/hugofs_integration_test.go‎

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,18 @@ Foo: {{ with $foo }}{{ .Content }}{{ else }}Fail{{ end }}
6161
[[module.mounts]]
6262
source = 'NODE_MODULES_SOURCE' # tries first in theme, then in project root
6363
target = 'assets/vendor/bootstrap'
64+
6465
`
66+
runFiles := func(files string) *hugolib.IntegrationTestBuilder {
67+
return hugolib.Test(t, files, hugolib.TestOptOsFs())
68+
}
6569
files := strings.ReplaceAll(filesTemplate, "NODE_MODULES_SOURCE", "node_modules/bootstrap")
66-
b := hugolib.Test(t, files)
70+
b := runFiles(files)
6771
b.AssertFileContent("public/index.html", "Foo: foo project.")
6872

6973
// This is for backwards compatibility. ../../node_modules/bootstrap works exactly the same as node_modules/bootstrap.
7074
files = strings.ReplaceAll(filesTemplate, "NODE_MODULES_SOURCE", "../../node_modules/bootstrap")
71-
b = hugolib.Test(t, files)
75+
b = runFiles(files)
7276
b.AssertFileContent("public/index.html", "Foo: foo project.")
7377

7478
files = strings.ReplaceAll(filesTemplate, "NODE_MODULES_SOURCE", "node_modules/bootstrap")
@@ -77,6 +81,6 @@ target = 'assets/vendor/bootstrap'
7781
foo theme.
7882
`
7983

80-
b = hugolib.Test(t, files)
84+
b = runFiles(files)
8185
b.AssertFileContent("public/index.html", "Foo: foo theme.")
8286
}

‎modules/collect.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -771,7 +771,7 @@ func (c *collector) normalizeMounts(owner *moduleAdapter, mounts []Mount) ([]Mou
771771
// Make this a special case and also try relative to the project root.
772772
sourceDir = filepath.Join(c.ccfg.WorkingDir, mnt.Source)
773773
_, err := c.fs.Stat(sourceDir)
774-
fmt.Printf("====> TODO1 remove2: %q => %v\n", sourceDir, err)
774+
fmt.Printf("====> TODO1 remove2: %q => %v (%q)\n", sourceDir, err, mnt.Source)
775775
if err != nil {
776776
continue
777777
}

0 commit comments

Comments
 (0)