cmd/api: don't try to parse JSON from stderr of go list

Just send the go list stderr to our stderr.

Change-Id: Iacda573bbe7accbcecb6a957e5d42b55afd10c58
Reviewed-on: https://go-review.googlesource.com/c/go/+/526775
Reviewed-by: Bryan Mills <bcmills@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
This commit is contained in:
Ian Lance Taylor 2023-09-07 13:57:23 -07:00 committed by Gopher Robot
parent 1d538f198d
commit 834a6f9a33
1 changed files with 2 additions and 1 deletions

View File

@ -490,7 +490,8 @@ func (w *Walker) loadImports() {
if w.context.Dir != "" {
cmd.Dir = w.context.Dir
}
out, err := cmd.CombinedOutput()
cmd.Stderr = os.Stderr
out, err := cmd.Output()
if err != nil {
log.Fatalf("loading imports: %v\n%s", err, out)
}