Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upko uses "go" as default GOROOT, causing build errors #218
Comments
Prevents ko tool from throwing "go: cannot find GOROOT directory: go" google/ko#218
|
I think @scothis has an open issue for this, and I think @jonjohnsonjr has the most context on this issue. |
|
@scothis do I understand correctly that |
|
Unfortunately |
Description
kouses"go"as GOROOT when GOROOT is not exported in the environment, instead of defaulting to$(go env GOROOT). This prevents builds from happening.In the previous version, the error message was quite explicit:
"go: cannot find GOROOT directory: go".Now, in 0.6.0, the error is much more ambiguous:
importpath "ko://knative.dev/serving/cmd/controller" is not supported.ko version
How to reproduce
Example, inside https://github.com/knative/serving/
$ printenv GOROOT # empty$ export GOROOT="$(go env GOROOT)"Temporary workaround
Add this line to your
.*shrcfile: