Skip to content

Commit

Permalink
Merge pull request #1 from oligot/main
Browse files Browse the repository at this point in the history
Fix issue oligot#35 - module inside workspace
  • Loading branch information
alessiosavi authored Jan 24, 2023
2 parents f90edd9 + a581599 commit 97363f2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,12 @@ func discover() ([]Module, error) {
"all",
}

list, err := exec.Command("go", args...).Output()
cmd := exec.Command("go", args...)
cmd.Env = os.Environ()
// Disable Go workspace mode, otherwise this can cause trouble
// See issue https://github.com/oligot/go-mod-upgrade/issues/35
cmd.Env = append(cmd.Env, "GOWORK=off")
list, err := cmd.Output()
s.Stop()

// Clear line
Expand Down

0 comments on commit 97363f2

Please sign in to comment.