mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-20 21:31:32 +02:00
@@ -21,6 +21,7 @@ import (
|
||||
_os "os"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/bep/overlayfs"
|
||||
"github.com/gohugoio/hugo/deps"
|
||||
"github.com/spf13/afero"
|
||||
"github.com/spf13/cast"
|
||||
@@ -32,7 +33,12 @@ func New(d *deps.Deps) *Namespace {
|
||||
|
||||
// The docshelper script does not have or need all the dependencies set up.
|
||||
if d.PathSpec != nil {
|
||||
readFileFs = afero.NewReadOnlyFs(afero.NewCopyOnWriteFs(d.PathSpec.BaseFs.Content.Fs, d.PathSpec.BaseFs.Work))
|
||||
readFileFs = overlayfs.New(overlayfs.Options{
|
||||
Fss: []afero.Fs{
|
||||
d.PathSpec.BaseFs.Work,
|
||||
d.PathSpec.BaseFs.Content.Fs,
|
||||
},
|
||||
})
|
||||
// See #9599
|
||||
workFs = d.PathSpec.BaseFs.WorkDir
|
||||
}
|
||||
|
Reference in New Issue
Block a user