Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

make sure use is only used when rvm is a function for gemset subcomma…

…nds, fix #1412
  • Loading branch information...
commit 7349f075ab1c5b164f6f9de8a870eae6393b7ca9 1 parent 0a1ba86
Michal Papis mpapis authored
Showing with 24 additions and 18 deletions.
  1. +24 −18 scripts/cli
42 scripts/cli
View
@@ -984,34 +984,40 @@ Please do one of the following:
if
[[ ${rvm_use_flag:-0} -eq 1 ]]
then
- __rvm_gemset_use
+ if rvm_is_a_shell_function
+ then __rvm_gemset_use
+ fi
else
export rvm_ruby_strings
"$rvm_scripts_path/gemsets" "${rvm_ruby_args[@]}"
result=$?
rvm_ruby_strings=""
- # Clear the gemset.
if
- [[ ${rvm_delete_flag:-0} -eq 1 ]]
+ rvm_is_a_shell_function no_warning
then
+ # Clear the gemset.
if
- [[ "${GEM_HOME:-""}" == "${GEM_HOME%%${rvm_gemset_separator:-@}*}${rvm_gemset_separator:-@}${rvm_gemset_name}" ]]
+ [[ ${rvm_delete_flag:-0} -eq 1 ]]
then
- rvm_delete_flag=0
- rvm_ruby_string="@default"
- __rvm_use
- fi
- unset gem_prefix
- elif
- [[ "${rvm_ruby_args[*]}" =~ ^rename ]]
- then
- typeset _command _from _to
- read _command _from _to <<<"${rvm_ruby_args[*]}"
- if
- [[ "${GEM_HOME:-""}" == "${GEM_HOME%%${rvm_gemset_separator:-@}*}${rvm_gemset_separator:-@}${_from}" ]]
+ if
+ [[ "${GEM_HOME:-""}" == "${GEM_HOME%%${rvm_gemset_separator:-@}*}${rvm_gemset_separator:-@}${rvm_gemset_name}" ]]
+ then
+ rvm_delete_flag=0
+ rvm_ruby_string="@default"
+ __rvm_use
+ fi
+ unset gem_prefix
+ elif
+ [[ "${rvm_ruby_args[*]}" =~ ^rename ]]
then
- rvm_ruby_string="@${_to}"
- __rvm_use
+ typeset _command _from _to
+ read _command _from _to <<<"${rvm_ruby_args[*]}"
+ if
+ [[ "${GEM_HOME:-""}" == "${GEM_HOME%%${rvm_gemset_separator:-@}*}${rvm_gemset_separator:-@}${_from}" ]]
+ then
+ rvm_ruby_string="@${_to}"
+ __rvm_use
+ fi
fi
fi
fi
Please sign in to comment.
Something went wrong with that request. Please try again.