diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2022-12-19 15:50:53 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2022-12-19 20:17:33 +0100 |
commit | 6db527483dec048fbcc5735c41b137a8eb6508e4 (patch) | |
tree | f94582a932a43b5a61638cd81105e63e7e9c2d7d /commands/hugo.go | |
parent | 0d4b17d4c03bfcbe3a5959e2c1dc47f4f36e47ed (diff) |
Add any configured Go Workspace file to the config watcher
Fixes #10556
Diffstat (limited to 'commands/hugo.go')
-rw-r--r-- | commands/hugo.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/commands/hugo.go b/commands/hugo.go index e247fca27..d2d99c7fa 100644 --- a/commands/hugo.go +++ b/commands/hugo.go @@ -924,6 +924,7 @@ func (c *commandeer) printChangeDetected(typ string) { const ( configChangeConfig = "config file" configChangeGoMod = "go.mod file" + configChangeGoWork = "go work file" ) func (c *commandeer) handleEvents(watcher *watcher.Batcher, @@ -943,6 +944,9 @@ func (c *commandeer) handleEvents(watcher *watcher.Batcher, if strings.Contains(ev.Name, "go.mod") { configChangeType = configChangeGoMod } + if strings.Contains(ev.Name, ".work") { + configChangeType = configChangeGoWork + } } if !isConfig { // It may be one of the /config folders |