mirror of
https://github.com/kennyp/asdf-golang.git
synced 2024-10-06 04:32:07 +08:00
Append @latest if doing install and version isn't specified.
This commit is contained in:
parent
89ced07d86
commit
03d30a52ae
@ -46,6 +46,10 @@ install_default_go_pkgs() {
|
|||||||
|
|
||||||
# if using go > 1.16 then use go install as the preferred donwload path
|
# if using go > 1.16 then use go install as the preferred donwload path
|
||||||
if [ "$go_major_version" -ge 2 ] || [ "${go_minor_version//[!0-9]*}" -ge 16 ]; then
|
if [ "$go_major_version" -ge 2 ] || [ "${go_minor_version//[!0-9]*}" -ge 16 ]; then
|
||||||
|
if [[ "$name" != *"@"* ]]; then
|
||||||
|
name="${name}@latest"
|
||||||
|
fi
|
||||||
|
|
||||||
GOROOT="$ASDF_INSTALL_PATH/go" \
|
GOROOT="$ASDF_INSTALL_PATH/go" \
|
||||||
GOPATH="$ASDF_INSTALL_PATH/packages" \
|
GOPATH="$ASDF_INSTALL_PATH/packages" \
|
||||||
PATH="$go_path:$PATH" \
|
PATH="$go_path:$PATH" \
|
||||||
|
Loading…
Reference in New Issue
Block a user