Skip to content

Commit

Permalink
fix: avoid using sg.Command before sage has been initialized to avoid…
Browse files Browse the repository at this point in the history
… .sage file exists error
  • Loading branch information
antonmoller committed Aug 7, 2023
1 parent c3b711b commit 22b48cd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,8 @@ func resolveSageModulePath(ctx context.Context) (string, error) {
return moduleName, nil //nolint:nilerr
}
var out bytes.Buffer
cmd := sg.Command(ctx, "go", "mod", "edit", "-json")
cmd := exec.CommandContext(ctx, "go", "mod", "edit", "-json")
cmd.Dir = sg.FromGitRoot()
cmd.Stdout = &out
if err := cmd.Run(); err != nil {
return "", err
Expand Down

0 comments on commit 22b48cd

Please sign in to comment.