Rework the Destination filesystem to make --renderStaticToDisk work

See #9626
This commit is contained in:
Bjørn Erik Pedersen
2022-03-21 09:35:15 +01:00
parent b08193971a
commit d070bdf10f
75 changed files with 651 additions and 566 deletions

View File

@@ -74,7 +74,7 @@ func (ns *Namespace) Config(path any) (image.Config, error) {
return config, nil
}
f, err := ns.deps.Fs.WorkingDir.Open(filename)
f, err := ns.deps.Fs.WorkingDirReadOnly.Open(filename)
if err != nil {
return image.Config{}, err
}

View File

@@ -82,7 +82,7 @@ func TestNSConfig(t *testing.T) {
t.Parallel()
c := qt.New(t)
v := config.New()
v := config.NewWithTestDefaults()
v.Set("workingDir", "/a/b")
ns := New(&deps.Deps{Fs: hugofs.NewMem(v)})