From 8c3ca4a0f4687e42eedc410c6507d2f2533effc1 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 10 Jun 2024 18:43:37 +0200 Subject: [PATCH] helpers2.1: $YNH_APP_INSTANCE_NAME -> $app --- helpers/helpers.v2.1.d/ruby | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/helpers/helpers.v2.1.d/ruby b/helpers/helpers.v2.1.d/ruby index 8e19548c7..eb8f8dc37 100644 --- a/helpers/helpers.v2.1.d/ruby +++ b/helpers/helpers.v2.1.d/ruby @@ -50,7 +50,7 @@ ynh_use_ruby () { [[ -n "${ruby_version:-}" ]] || ynh_die --message="\$ruby_version should be defined prior to calling ynh_use_ruby" # Get the absolute path of this version of Ruby - ruby_path="$ruby_version_path/$YNH_APP_INSTANCE_NAME/bin" + ruby_path="$ruby_version_path/$app/bin" # Allow alias to be used into bash script shopt -s expand_aliases @@ -202,13 +202,13 @@ ynh_install_ruby () { ruby_version=$final_ruby_version # Remove app virtualenv - if rbenv alias --list | grep --quiet "$YNH_APP_INSTANCE_NAME " + if rbenv alias --list | grep --quiet "$app " then - rbenv alias $YNH_APP_INSTANCE_NAME --remove + rbenv alias $app --remove fi # Create app virtualenv - rbenv alias $YNH_APP_INSTANCE_NAME $final_ruby_version + rbenv alias $app $final_ruby_version # Cleanup Ruby versions ynh_cleanup_ruby @@ -238,7 +238,7 @@ ynh_remove_ruby () { # Remove /usr/local/bin in PATH in case of Ruby prior installation PATH=$(echo $CLEAR_PATH | sed 's@/usr/local/bin:@@') - rbenv alias $YNH_APP_INSTANCE_NAME --remove + rbenv alias $app --remove # Remove the line for this app ynh_app_setting_delete --key=ruby_version