Skip to content

Commit

Permalink
Fix htimes /: operation not permitted error on config changes
Browse files Browse the repository at this point in the history
Regression introduced in v0.104.1.
  • Loading branch information
bep committed Sep 29, 2022
1 parent 2171e3c commit 4611b69
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion commands/commandeer.go
Expand Up @@ -79,8 +79,8 @@ type commandeer struct {
changeDetector *fileChangeDetector

// We need to reuse these on server rebuilds.
// These 2 will be different if --renderStaticToDisk is set.
publishDirFs afero.Fs
publishDirStaticFs afero.Fs
publishDirServerFs afero.Fs

h *hugoBuilderCommon
Expand Down Expand Up @@ -170,6 +170,7 @@ func (c *commandeer) Set(key string, value any) {

func (c *commandeer) initFs(fs *hugofs.Fs) error {
c.publishDirFs = fs.PublishDir
c.publishDirStaticFs = fs.PublishDirStatic
c.publishDirServerFs = fs.PublishDirServer
c.DepsCfg.Fs = fs

Expand Down Expand Up @@ -426,6 +427,7 @@ func (c *commandeer) loadConfig() error {
if c.publishDirFs != nil {
// Need to reuse the destination on server rebuilds.
fs.PublishDir = c.publishDirFs
fs.PublishDirStatic = c.publishDirStaticFs
fs.PublishDirServer = c.publishDirServerFs
} else {
if c.renderStaticToDisk {
Expand Down

0 comments on commit 4611b69

Please sign in to comment.