File tree 2 files changed +14
-3
lines changed
2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -78,6 +78,14 @@ verifying checksum
78
78
checksum verified
79
79
```
80
80
81
+ ## ` GOROOT ` and ` GOPATH ` Overrides
82
+
83
+ By default, ` $GOROOT ` and ` $GOPATH ` are set to the selected version's
84
+ ` .../go ` and ` .../packages ` dirs, and unset if the selected version is
85
+ ` system ` . Set the ` $ASDF_GOLANG_DISABLE_GOROOT ` and/or
86
+ ` $ASDF_GOLANG_DISABLE_GOPATH ` environment variables to ` 1 ` to disable
87
+ this behavior for the respective variables.
88
+
81
89
## Contributing
82
90
83
91
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