helpers/v1/go: fix call.

goenv latest doesn’t call the plugin anymore, so i’m calling directly the plugin goenv-latest.
This commit is contained in:
Salamandar 2024-06-10 12:11:26 +02:00
parent c6bda180b4
commit f0727ebdb4

View file

@ -128,9 +128,10 @@ ynh_install_go () {
popd popd
# Install or update xxenv-latest # Install or update xxenv-latest
mkdir -p "$goenv_install_dir/plugins/xxenv-latest" goenv_latest_dir="$goenv_install_dir/plugins/xxenv-latest"
pushd "$goenv_install_dir/plugins/xxenv-latest" mkdir -p "$goenv_latest_dir"
if ! [ -x "$goenv_install_dir/plugins/xxenv-latest/bin/goenv-latest" ]; then pushd "$goenv_latest_dir"
if ! [ -x "$goenv_latest_dir/bin/goenv-latest" ]; then
ynh_print_info --message="Downloading xxenv-latest..." ynh_print_info --message="Downloading xxenv-latest..."
git init -q git init -q
git remote add origin https://github.com/momo-lab/xxenv-latest.git git remote add origin https://github.com/momo-lab/xxenv-latest.git
@ -155,7 +156,7 @@ ynh_install_go () {
test -x /usr/bin/go_goenv && mv /usr/bin/go_goenv /usr/bin/go test -x /usr/bin/go_goenv && mv /usr/bin/go_goenv /usr/bin/go
# Install the requested version of Go # Install the requested version of Go
local final_go_version=$(goenv latest --print "$go_version") local final_go_version=$("$goenv_latest_dir/bin/goenv-latest" --print "$go_version")
ynh_print_info --message="Installation of Go-$final_go_version" ynh_print_info --message="Installation of Go-$final_go_version"
goenv install --skip-existing "$final_go_version" goenv install --skip-existing "$final_go_version"