File tree 2 files changed +16
-5
lines changed
2 files changed +16
-5
lines changed Original file line number Diff line number Diff line change @@ -56,8 +56,8 @@ selected, not necessarily `1.14.patch`.
56
56
57
57
## Architecture Override
58
58
59
- The ` ASDF_GOLANG_OVERWRITE_ARCH ` variable can be used to override the architecture
60
- that is used for determining which Go build to download. The primary use case is when attempting
59
+ The ` ASDF_GOLANG_OVERWRITE_ARCH ` variable can be used to override the architecture
60
+ that is used for determining which Go build to download. The primary use case is when attempting
61
61
to install an older version of Go for use on an Apple M1 computer as Go was not being built for ARM at the time.
62
62
63
63
#### Without ASDF_GOLANG_OVERWRITE_ARCH
@@ -86,6 +86,14 @@ checksum verified
86
86
By default we try to verify the checksum of each install but ocassionally [ that's not possible] ( https://github.com/kennyp/asdf-golang/issues/91 ) .
87
87
If you need to skip the checksum for some reason just set ` ASDF_GOLANG_SKIP_CHECKSUM ` .
88
88
89
+ ## ` GOROOT ` and ` GOPATH ` Overrides
90
+
91
+ By default, ` $GOROOT ` and ` $GOPATH ` are set to the selected version's
92
+ ` .../go ` and ` .../packages ` dirs, and unset if the selected version is
93
+ ` system ` . Set the ` $ASDF_GOLANG_DISABLE_GOROOT ` and/or
94
+ ` $ASDF_GOLANG_DISABLE_GOPATH ` environment variables to ` 1 ` to disable
95
+ this behavior for the respective variables.
96
+
89
97
## Contributing
90
98
91
99
Feel free to create an issue or pull request if you find a bug.
Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env bash
2
2
3
3
if [ " ${ASDF_INSTALL_VERSION} " = ' system' ] ; then
4
- unset -v GOROOT GOPATH
4
+ [ " ${ASDF_GOLANG_DISABLE_GOROOT-} " = ' 1' ] || unset -v GOROOT
5
+ [ " ${ASDF_GOLANG_DISABLE_GOPATH-} " = ' 1' ] || unset -v GOPATH
5
6
else
6
- export GOROOT=$ASDF_INSTALL_PATH /go
7
- export GOPATH=$ASDF_INSTALL_PATH /packages
7
+ [ " ${ASDF_GOLANG_DISABLE_GOROOT-} " = ' 1' ] ||
8
+ export GOROOT=$ASDF_INSTALL_PATH /go
9
+ [ " ${ASDF_GOLANG_DISABLE_GOPATH-} " = ' 1' ] ||
10
+ export GOPATH=$ASDF_INSTALL_PATH /packages
8
11
fi
You can’t perform that action at this time.
0 commit comments