From a81724108bdc6d77696a21c4cbc25626bbc7d515 Mon Sep 17 00:00:00 2001 From: Tatsuki Sugiura Date: Tue, 21 Aug 2018 16:25:35 +0900 Subject: [PATCH] Fix rvm_path variable handling for install error. With current rvm installer fails with following message if user do not set rvm_path environment. ``` ERROR: --path must be followed by a path. ``` This patch fixes option handling with rvm_path environment variable. --- script/install-rvm.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/script/install-rvm.sh b/script/install-rvm.sh index fba057f..dc6d5f0 100644 --- a/script/install-rvm.sh +++ b/script/install-rvm.sh @@ -11,8 +11,11 @@ mkdir "${CURL_HOME}/" && exit $? # run the installer -echo $rvm_path -if \curl -L https://get.rvm.io -o rvm-installer.sh && bash rvm-installer.sh stable --path $rvm_path +options="" +if [ ! -z "$rvm_path" ]; then + options="--path '$rvm_path'" +fi +if \curl -L https://get.rvm.io -o rvm-installer.sh && bash rvm-installer.sh stable $options then __LAST_STATUS=0 else __LAST_STATUS=$? fi