After some more digging into #83, the issue was actually lack of HOME. We need to specify GOPATH and GOCACHE because we haven't specified a HOME. Given the setup, ``` cd $(mktemp -d) echo "module example.com/demo" > go.mod echo "package demo" > demo.go eval $(gimme 1.16rc1) GO=$(which go) ``` If we run `go build` with an empty environment, it fails as expected. ``` $ env -i $GO build missing $GOPATH ``` Setting HOME gives it a good default place for GOPATH, GOCACHE, and friends. ``` $ env -i HOME=$(pwd)/home $GO build # succeeds ```
4.3 KiB
4.3 KiB