Skip to content

Commit

Permalink
Added error handling around the sourcing of primary scripts when load…
Browse files Browse the repository at this point in the history
…ing RVM.
  • Loading branch information
wayneeseguin committed Sep 6, 2010
1 parent fb71792 commit 2a99273
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions scripts/rvm
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,13 @@ if [[ $rvm_loaded_flag -eq 0 || $rvm_reload_flag -eq 1 ]] ; then
rvm_scripts_path="${rvm_scripts_path:-"$rvm_path/scripts"}"

if [[ -d "$rvm_path" ]] ; then
source "$rvm_scripts_path/array"
source "$rvm_scripts_path/utility"
source "$rvm_scripts_path/initialize"
source "$rvm_scripts_path/version"
source "$rvm_scripts_path/selector"
source "$rvm_scripts_path/cli"
source "$rvm_scripts_path/cd"
source "$rvm_scripts_path/override_gem"
for script in array utility initialize version selector cli cd override_gem ; do
if [[ -f "$rvm_scripts_path/$script" ]] ; then
source "$rvm_scripts_path/$script"
else
"$rvm_scripts_path/log" "error" "RVM: Could not source script '$rvm_scripts_path/$script', file does not exist. RVM will likely not work as expected."
fi
done

rvm_loaded_flag=1

Expand Down

0 comments on commit 2a99273

Please sign in to comment.