mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-12 20:13:59 +02:00
Add any configured Go Workspace file to the config watcher
Fixes #10556
This commit is contained in:
@@ -15,6 +15,7 @@ package modules
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
@@ -261,6 +262,9 @@ func decodeConfig(cfg config.Provider, pathReplacements map[string]string) (Conf
|
||||
workingDir := cfg.GetString("workingDir")
|
||||
c.Workspace = filepath.Join(workingDir, c.Workspace)
|
||||
}
|
||||
if _, err := os.Stat(c.Workspace); err != nil {
|
||||
return c, fmt.Errorf("module workspace %q does not exist", c.Workspace)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user