Preventing Go users from having their GOPATH changed when upgrading. (#1787)

* Preventing Go users from having their GOPATH changed when upgrading.

* Updated to suggested manifest in review. Adds / removes default gopath/bin to the path without setting the gopath.

Please move everything from `$persist_dir\go` to `$env:USERPROFILE\go`
This commit is contained in:
Shaunn Barron 2017-10-26 15:40:11 -04:00 committed by Richard Kuhnt
parent b5fda987ef
commit 96f9b79bf9

18
go.json
View File

@ -5,13 +5,15 @@
"persist": "go",
"extract_dir": "go",
"env_set": {
"GOROOT": "$dir",
"GOPATH": "$persist_dir\\go"
"GOROOT": "$dir"
},
"env_add_path": "bin",
"installer": {
"script": "add_first_in_path \"$env:USERPROFILE\\go\\bin\" $global"
},
"uninstaller": {
"script": "remove_from_path \"$env:USERPROFILE\\go\\bin\" $global"
},
"env_add_path": [
"bin",
"go\\bin"
],
"architecture": {
"64bit": {
"url": "https://storage.googleapis.com/golang/go1.9.2.windows-amd64.zip",
@ -38,7 +40,7 @@
},
"notes": "
Your GOROOT has been set to: $dir
Your GOPATH has been set to: $persist_dir\\go
You can run 'go env GOPATH' or 'go env GOROOT' to view these at any time.
You can run 'go env GOROOT' to view this at any time.
\"$env:USERPROFILE\\go\\bin)\" has been added to your PATH.
"
}