Skip to content

Commit

Permalink
only parse stdout from "go env"
Browse files Browse the repository at this point in the history
I use a wrapper around go that prints some debug to stderr
which causes the unmarshalling below to fail.
  • Loading branch information
jmelahman authored Dec 6, 2024
1 parent 6ac80db commit 7678613
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2422,7 +2422,7 @@ func fetchGoEnv() error {
out, err := exec.Command("go", "env", "-json",
// Keep in sync with [sharedCacheType.GoEnv].
"GOOS", "GOARCH", "GOMOD", "GOVERSION", "GOROOT",
).CombinedOutput()
).Output()
if err != nil {
// TODO: cover this in the tests.
fmt.Fprintf(os.Stderr, `Can't find the Go toolchain: %v
Expand Down

0 comments on commit 7678613

Please sign in to comment.