Skip to content

Commit

Permalink
fix(cmd/gf): fix command gf up with -u option upgrading packages …
Browse files Browse the repository at this point in the history
…indirectly required would fail with higher version of go required (#3687)
  • Loading branch information
hailaz authored Jul 17, 2024
1 parent 559ae0e commit ba322ba
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cmd/gf/internal/cmd/cmd_up.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,9 @@ func (c cUp) doUpgradeVersion(ctx context.Context, in cUpInput) (out *doUpgradeV
}
for _, pkg := range packages {
mlog.Printf(`upgrading "%s" from "%s" to "latest"`, pkg.Name, pkg.Version)
// go get -u
command := fmt.Sprintf(`cd %s && go get -u %s@latest`, dirPath, pkg.Name)
mlog.Printf(`running command: go get %s@latest`, pkg.Name)
// go get @latest
command := fmt.Sprintf(`cd %s && go get %s@latest`, dirPath, pkg.Name)
if err = gproc.ShellRun(ctx, command); err != nil {
return
}
Expand Down

0 comments on commit ba322ba

Please sign in to comment.