You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ go generate -x
/usr/local/gotools/bin/counterfeiter io.Reader
Writing `FakeReader` to `gorootbugfakes/fake_reader.go`...
go/build: go list io: exit status 2
go: cannot find GOROOT directory: go
bug.go:3: running "/usr/local/gotools/bin/counterfeiter": exit status 1
If I explicitly set GOROOT to itself, then it works.
$ GOROOT=$(go env GOROOT) go generate -x
/usr/local/gotools/bin/counterfeiter io.Reader
Writing `FakeReader` to `gorootbugfakes/fake_reader.go`... Done
The text was updated successfully, but these errors were encountered:
@hyangah Other than setting the GOROOT env var improperly (which it doesn't seem to do), what could counterfeiter possibly do to cause the go tool to fail in this manner?
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (
go env
)?go env
OutputNote that the
GOROOT
environment variable is not set. (It is being calculated automatically from the go command's location.)What did you do?
Then ran
go generate
.What did you expect to see?
It should work.
What did you see instead?
If I explicitly set GOROOT to itself, then it works.
The text was updated successfully, but these errors were encountered: