Files
atomic/nocmp_test.go
Abhinav Gupta 9c79392530 nomcmp/test: Only set HOME (#84)
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
```
2021-02-02 14:19:09 -08:00

4.3 KiB