mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-17 21:01:26 +02:00
Add any configured Go Workspace file to the config watcher
Fixes #10556
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user