mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-07 20:30:36 -05:00
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
This commit is contained in:
parent
e28bd4c0f8
commit
6eca0a3dee
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue