cmd/release: use %USERPROFILE% instead of %GOPATH% in PATH
CL 104115 added %GOPATH%\bin to the PATH. But GOPATH environment
variable might contain directory list. So, if, for example, GOPATH has
"c:\a;c:\b", then PATH is end up with "c:\a;c:\b\bin" - which is wrong -
user, probably, wants both c:\a\bin and c:\b\bin to be listed in his/her
PATH.
Use %USERPROFILE%\go\bin instead, because USERPROFILE always has
directory.
If user wants to change GOPATH, they would have to adjust their PATH
manually.
Updates golang/go#18583
Change-Id: I634a25ace28776c978faebcfcb2c1750d6d17a0d
Reviewed-on: https://go-review.googlesource.com/c/127777
Reviewed-by: Ron Evans <ron@hybridgroup.com>
Reviewed-by: Mario Arranz <marioarranzr@gmail.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
diff --git a/cmd/release/releaselet.go b/cmd/release/releaselet.go
index b058c5d..72f28fc 100644
--- a/cmd/release/releaselet.go
+++ b/cmd/release/releaselet.go
@@ -719,7 +719,7 @@
Part="last"
Name="PATH"
Permanent="no"
- Value="%GOPATH%\bin" />
+ Value="%USERPROFILE%\go\bin" />
<RemoveFolder
Id="GoEnvironmentEntries"
On="uninstall" />