summaryrefslogtreecommitdiffstats
path: root/src/cmd/go/testdata/script/build_relative_tmpdir.txt
blob: 3e98a67b813e1174924678765f80336c1c1f0eea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
env GO111MODULE=off

# If GOTMPDIR is relative, 'go build' should derive an absolute $WORK directory.
cd $WORK
mkdir tmp
env GOTMPDIR=tmp
go build -work a
stderr 'WORK=\$WORK' # the test script itself converts the absolute directory back to $WORK

# Similarly if TMP/TMPDIR is relative.
env GOTMPDIR=
env TMP=tmp    # Windows
env TMPDIR=tmp # Unix
go build -work a
stderr 'WORK=\$WORK'

-- a/a.go --
package a