aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/go/testdata/script/build_GOTMPDIR.txt
blob: c93ca932cab5064aac1626df7f80d6fd4f1991f8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
env GO111MODULE=off
[short] skip

# Set GOCACHE to a clean directory to ensure that 'go build' has work to report.
env GOCACHE=$WORK/gocache

# Build should use GOTMPDIR if set.
env GOTMPDIR=$WORK/my-favorite-tmpdir
mkdir $GOTMPDIR
go build -work hello.go
stderr ^WORK=.*my-favorite-tmpdir

-- hello.go --
package main
func main() { println("hello") }