Skip to content

Commit

Permalink
commands: Fix hugo mod get -u ./...
Browse files Browse the repository at this point in the history
Fixes #12625
  • Loading branch information
bep committed Jul 6, 2024
1 parent 644d554 commit 251a23e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions commands/mod.go
Original file line number Diff line number Diff line change
Expand Up @@ -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...)

Expand Down

0 comments on commit 251a23e

Please sign in to comment.