aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/go/testdata/script/mod_get_cmd.txt
blob: d31cee1444a6adf5dcc8b4706f06584dbf31ae3c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
env GO111MODULE=on
[short] skip

# Test that when 'go get' is run from $GOBIN, it does not delete binaries
# after it installs them. Verifies golang.org/issue/32766.

go get example.com/tools/cmd/hello

# 'go get' should not delete the command when run from $GOPATH/bin
cd $GOPATH/bin
exists hello$GOEXE
go get example.com/tools/cmd/hello
exists hello$GOEXE

# 'go get' should not delete the command when run from a different $GOBIN
mkdir $WORK/bin
cd $WORK/bin
env GOBIN=$WORK/bin
go get example.com/tools/cmd/hello
exists hello$GOEXE