summaryrefslogtreecommitdiffstats
path: root/commands/hugo.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2022-12-19 15:50:53 +0100
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2022-12-19 20:17:33 +0100
commit6db527483dec048fbcc5735c41b137a8eb6508e4 (patch)
treef94582a932a43b5a61638cd81105e63e7e9c2d7d /commands/hugo.go
parent0d4b17d4c03bfcbe3a5959e2c1dc47f4f36e47ed (diff)
Add any configured Go Workspace file to the config watcher
Fixes #10556
Diffstat (limited to 'commands/hugo.go')
-rw-r--r--commands/hugo.go4
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