diff options
| author | yalh76 <yalh@yahoo.com> | 2021-02-24 07:47:09 +0100 |
|---|---|---|
| committer | yalh76 <yalh@yahoo.com> | 2021-02-24 07:47:09 +0100 |
| commit | 867c83b3f8e768cf110b8d9f1426a2751a88339a (patch) | |
| tree | 4c6c68a73659155f6998b5120476b257cc057f4f /scripts | |
| parent | 9691d954dc29f8d3468b8de87d934d5954320871 (diff) | |
| download | mastodon_ynh-867c83b3f8e768cf110b8d9f1426a2751a88339a.tar.gz mastodon_ynh-867c83b3f8e768cf110b8d9f1426a2751a88339a.tar.bz2 mastodon_ynh-867c83b3f8e768cf110b8d9f1426a2751a88339a.zip | |
Fix rbenv alias not existing in previous version
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/ynh_install_ruby__2 | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/ynh_install_ruby__2 b/scripts/ynh_install_ruby__2 index e885b96..1d9bf8d 100644 --- a/scripts/ynh_install_ruby__2 +++ b/scripts/ynh_install_ruby__2 @@ -118,7 +118,10 @@ ynh_install_ruby () { # Remove previous version if grep --quiet "$YNH_APP_INSTANCE_NAME:" "$rbenv_install_dir/ynh_app_version" then - rbenv alias $YNH_APP_INSTANCE_NAME --remove + if grep --quiet "$YNH_APP_INSTANCE_NAME" $(rbenv alias --list) + then + rbenv alias $YNH_APP_INSTANCE_NAME --remove + fi sed --in-place "/$YNH_APP_INSTANCE_NAME:/d" "$rbenv_install_dir/ynh_app_version" fi |
