Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/cover: failing when the go command doesn't stay in $GOROOT/bin #27113

Closed
mikioh opened this issue Aug 21, 2018 · 3 comments
Closed

cmd/cover: failing when the go command doesn't stay in $GOROOT/bin #27113

mikioh opened this issue Aug 21, 2018 · 3 comments

Comments

@mikioh
Copy link
Contributor

mikioh commented Aug 21, 2018

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

+fc5107c, perhaps go1.11 too

Does this issue reproduce with the latest release?

yes

What operating system and processor architecture are you using (go env)?

no matter

What did you do?

  1. share the $GOROOT over network file system
  2. move go command to $GOBIN from $GOROOT/bin, for example, set GOBIN=$HOME/bin/$GOOS_$GOARCH, after all.bash success on each $GOOS/$GOARCH
  3. run go test -coverprofile=covp && go tool cover -html=covp at some package directory

What did you expect to see?

works well the same as go1.10 or below

What did you see instead?

cover: cannot run go list: fork/exec $GOROOT/bin/go: no such file or directory

@mikioh
Copy link
Contributor Author

mikioh commented Aug 21, 2018

Although, I think it's fine this is a newly introduced restriction on the versioning and module supported go command, as https://github.com/golang/go/blob/master/src/cmd/cover/func.go#L194 describes a bit.

/CC @rsc

@rsc
Copy link
Contributor

rsc commented Aug 21, 2018

Don't move the go command out of $GOROOT/bin.

@rsc rsc closed this as completed Aug 21, 2018
@mikioh
Copy link
Contributor Author

mikioh commented Aug 22, 2018

And don't rename the $GOROOT/bin/go command.

@golang golang locked and limited conversation to collaborators Aug 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants