Skip to content

Commit

Permalink
fix: use -mod=readonly for go list
Browse files Browse the repository at this point in the history
  • Loading branch information
haunt98 committed Sep 13, 2024
1 parent bdc7f7b commit c26d3c4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/cli/action_run.go
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ func (a *action) runUpgradeModule(
}

// Get module latest version
goListArgs := []string{"list", "-m", "-u", "-json", modulePath}
goListArgs := []string{"list", "-m", "-u", "-json", "-mod=readonly", modulePath}
goOutput, err := exec.CommandContext(c.Context, "go", goListArgs...).CombinedOutput()
if err != nil {
return successUpgradedModules, fmt.Errorf("failed to run go %+v: %w", strings.Join(goListArgs, " "), err)
Expand Down

0 comments on commit c26d3c4

Please sign in to comment.