Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2019-07-30 10:35:01 +0300
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2019-07-30 10:35:01 +0300
commit6eca0a3dee77f0e764b1de2e10c10ec2b7cf8ef1 (patch)
tree08aef9321dfab6a707462aa6ba990ca583b88d15 /commands/hugo.go
parente28bd4c0f843f39cfcb715b6c9c7d249bad5b500 (diff)
commands: Fix config reloading in Vim and similar
The config path was simplified in Hugo 0.56.0 to support more config dirs/files (go.mod etc.), and the new code path assumed that every file change would trigger a `Write` event. This is not true for Vim etc. which triggers a `Chmod` and then a `Rename`. Lesson learned: Be really careful changing Os/editor specific code without proper tests. Fixes #6139
Diffstat (limited to 'commands/hugo.go')
-rw-r--r--commands/hugo.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/commands/hugo.go b/commands/hugo.go
index 36d3812eb..f9d4c12a5 100644
--- a/commands/hugo.go
+++ b/commands/hugo.go
@@ -914,12 +914,12 @@ func (c *commandeer) handleEvents(watcher *watcher.Batcher,
}
}
- // A write event will follow.
- continue
}
// Config file(s) changed. Need full rebuild.
c.fullRebuild(configChangeType)
+
+ return
}
}