mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-21 21:35:28 +02:00
Rework the Destination filesystem to make --renderStaticToDisk work
See #9626
This commit is contained in:
@@ -496,9 +496,9 @@ func (h *HugoSites) writeBuildStats() error {
|
||||
return err
|
||||
}
|
||||
|
||||
// Write to the destination, too, if a mem fs is in play.
|
||||
if h.Fs.Source != hugofs.Os {
|
||||
if err := afero.WriteFile(h.Fs.Destination, filename, js, 0666); err != nil {
|
||||
// Write to the destination as well if it's a in-memory fs.
|
||||
if !hugofs.IsOsFs(h.Fs.Source) {
|
||||
if err := afero.WriteFile(h.Fs.WorkingDirWritable, filename, js, 0666); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user