diff options
author | Russ Cox <rsc@golang.org> | 2021-01-26 21:14:43 -0500 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2021-02-19 00:04:56 +0000 |
commit | bb6efb96092cc8ae398c29e3b052a0051c746f88 (patch) | |
tree | 82826936fc780c8aab1e6a1f9d68c4ae7295ecae /src/run.bat | |
parent | a1222b75350a098e70106bf95d4e6a962c37f373 (diff) | |
download | go-git-bb6efb96092cc8ae398c29e3b052a0051c746f88.tar.gz |
build: set GOPATH consistently in run.bash, run.bat, run.rc
We used to clear GOPATH in all the build scripts.
Clearing GOPATH is misleading at best, since you just end up
with the default GOPATH (%USERPROFILE%\go on Windows).
Unless that's your GOROOT, in which case you end up with a
fatal error from the go command (#43938).
run.bash changed to setting GOPATH=/dev/null, which has no
clear analogue on Windows.
run.rc still clears GOPATH.
Change them all to set GOPATH to a non-existent directory
/nonexist-gopath or c:\nonexist-gopath.
Change-Id: I51edd66d37ff6a891b0d0541d91ecba97fbbb03d
Reviewed-on: https://go-review.googlesource.com/c/go/+/288818
Trust: Russ Cox <rsc@golang.org>
Trust: Jason A. Donenfeld <Jason@zx2c4.com>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
Reviewed-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/run.bat')
-rw-r--r-- | src/run.bat | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/run.bat b/src/run.bat index c299671c13..edcaf52659 100644 --- a/src/run.bat +++ b/src/run.bat @@ -18,9 +18,7 @@ setlocal set GOBUILDFAIL=0
-:: we disallow local import for non-local packages, if %GOROOT% happens
-:: to be under %GOPATH%, then some tests below will fail
-set GOPATH=
+set GOPATH=c:\nonexist-gopath
:: Issue 14340: ignore GOBIN during all.bat.
set GOBIN=
set GOFLAGS=
|