1 env GO111MODULE=on
2 [short] skip
3
4 # Test that when 'go get' is run from $GOBIN, it does not delete binaries
5 # after it installs them. Verifies golang.org/issue/32766.
6
7 go get example.com/tools/cmd/hello
8
9 # 'go get' should not delete the command when run from $GOPATH/bin
10 cd $GOPATH/bin
11 exists hello$GOEXE
12 go get example.com/tools/cmd/hello
13 exists hello$GOEXE
14
15 # 'go get' should not delete the command when run from a different $GOBIN
16 mkdir $WORK/bin
17 cd $WORK/bin
18 env GOBIN=$WORK/bin
19 go get example.com/tools/cmd/hello
20 exists hello$GOEXE
21
View as plain text