From f0727ebdb4c7d968e1e08cf560072aaba31de921 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Mon, 10 Jun 2024 12:11:26 +0200 Subject: [PATCH] helpers/v1/go: fix call. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit goenv latest doesn’t call the plugin anymore, so i’m calling directly the plugin goenv-latest. --- helpers/helpers.v1.d/go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/helpers/helpers.v1.d/go b/helpers/helpers.v1.d/go index b939ae548..86b2b83a8 100644 --- a/helpers/helpers.v1.d/go +++ b/helpers/helpers.v1.d/go @@ -128,9 +128,10 @@ ynh_install_go () { popd # Install or update xxenv-latest - mkdir -p "$goenv_install_dir/plugins/xxenv-latest" - pushd "$goenv_install_dir/plugins/xxenv-latest" - if ! [ -x "$goenv_install_dir/plugins/xxenv-latest/bin/goenv-latest" ]; then + goenv_latest_dir="$goenv_install_dir/plugins/xxenv-latest" + mkdir -p "$goenv_latest_dir" + pushd "$goenv_latest_dir" + if ! [ -x "$goenv_latest_dir/bin/goenv-latest" ]; then ynh_print_info --message="Downloading xxenv-latest..." git init -q 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 # 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" goenv install --skip-existing "$final_go_version"