aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2024-07-06 15:38:21 +0200
committerBjørn Erik Pedersen <[email protected]>2024-07-06 15:38:21 +0200
commit251a23ef76e4fcee4664a5e7bfdac5cba490b6cb (patch)
tree8cba8545b7bc44c6b8fe55055c80ee0f6f567908
parent644d55475d631f60177eb792e9a010a39160df85 (diff)
downloadhugo-251a23ef76e4fcee4664a5e7bfdac5cba490b6cb.tar.gz
hugo-251a23ef76e4fcee4664a5e7bfdac5cba490b6cb.zip
commands: Fix hugo mod get -u ./...
Fixes #12625
-rw-r--r--commands/mod.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/commands/mod.go b/commands/mod.go
index 7ff662944..0fa83e5c0 100644
--- a/commands/mod.go
+++ b/commands/mod.go
@@ -268,13 +268,14 @@ Run "go help get" for more information. All flags available for "go get" is also
if info.Name() == "go.mod" {
// Found a module.
dir := filepath.Dir(path)
- r.Println("Update module in", dir)
+
cfg := config.New()
cfg.Set("workingDir", dir)
- conf, err := r.ConfigFromProvider(r.configVersionID.Load(), flagsToCfg(cd, cfg))
+ conf, err := r.ConfigFromProvider(r.configVersionID.Add(1), flagsToCfg(cd, cfg))
if err != nil {
return err
}
+ r.Println("Update module in", conf.configs.Base.WorkingDir)
client := conf.configs.ModulesClient
return client.Get(args...)