From 6eca0a3dee77f0e764b1de2e10c10ec2b7cf8ef1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Tue, 30 Jul 2019 09:35:01 +0200 Subject: 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 --- commands/hugo.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'commands') 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 } } -- cgit v1.2.3