Skip to content

cmd/go: go get -x prints to stdout #31768

@heschi

Description

@heschi

What version of Go are you using (go version)?

$ go version
go version devel +08318f5942 Tue Apr 30 20:30:30 2019 +0000 linux/amd64

Does this issue reproduce with the latest release?

Yes.

What did you do?

go list -x -v -m -e -json --versions android.googlesource.com/platform/tools/gpu.git@latest 2> /dev/null

What did you expect to see?

Just JSON, i.e.

{
	"Path": "android.googlesource.com/platform/tools/gpu.git",
	"Version": "v0.0.0-20150804144629-269101c4a73c",
	"Time": "2015-08-04T14:46:29Z"
}

What did you see instead?

Some stray -x output on stdout, which breaks JSON parsing:

cd .
git ls-remote https://android.googlesource.com/platform/tools/gpu
{
	"Path": "android.googlesource.com/platform/tools/gpu.git",
	"Version": "v0.0.0-20150804144629-269101c4a73c",
	"Time": "2015-08-04T14:46:29Z"
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions