scripts/set in rvm-1.0.1 vs scripts/set in rvm-1.0.2
- old
+ new
@@ -1,11 +1,11 @@
#!/usr/bin/env bash
source "$rvm_scripts_path/base"
if [[ -z "$1" ]] ; then
- $rvm_scripts_path/log "error" "Action must be specified."
+ "$rvm_scripts_path/log" "error" "Action must be specified."
exit 1
fi
__rvm_attempt_single_exec() {
# Return if we have multiple rubies. or we're not running exec.
@@ -33,11 +33,11 @@
elif [[ -x "$rvm_ruby_gem_home/bin/$binary" ]] ; then
binary="$rvm_ruby_gem_home/bin/$binary"
elif [[ "system" = "$rvm_ruby_string" ]] && [[ -x "$(command -v $binary)" ]] ; then
binary="$(basename $(command -v $binary) 2>/dev/null)"
else
- $rvm_scripts_path/log "warn" "'$binary not found for $rvm_ruby_string' either does not exist or is not executable? :("
+ "$rvm_scripts_path/log" "warn" "'$binary not found for $rvm_ruby_string' either does not exist or is not executable? :("
__rvm_unset_ruby_variables
return 1
fi
if [[ ! -z "$rvm_ruby_mode" ]] ; then
@@ -46,13 +46,13 @@
fi
load_path="$(dirname $(command -v $binary) 2>/dev/null):$rvm_ruby_load_path"
# TODO: the else case below should be run if $args =~ /\.rb$/
if [[ "ruby" = "$(basename $binary)" ]] && [[ "$rvm_benchmark_flag" -ne 1 ]] ; then
- if $rvm_scripts_path/match "$args" "\.rb$" ; then
+ if "$rvm_scripts_path/match" "$args" "\.rb$" ; then
if [[ -z "$prefix" ]] ; then prefix="-S" ; fi
- if ! $rvm_scripts_path/match "$args" "$prefix" ; then
+ if ! "$rvm_scripts_path/match" "$args" "$prefix" ; then
args="$prefix $args"
fi
fi
rvm_command="$binary $rvm_ruby_mode $rvm_ruby_require -I$load_path $args"
else
@@ -68,11 +68,11 @@
if [[ "$rvm_verbose_flag" != "0" ]] ; then
current_env="$(__rvm_environment_identifier)"
if [[ "$current_env" != "$current_set_ruby" ]]; then
current_env="$current_set_ruby ($current_env)"
fi
- $rvm_scripts_path/log "info" "$current_env: $(ruby -v $rvm_ruby_mode | \tr "\n" ' ')\n"
+ "$rvm_scripts_path/log" "info" "$current_env: $(ruby -v $rvm_ruby_mode | \tr "\n" ' ')\n"
unset current_env
fi
eval "$rvm_command"
fi
result=$?
@@ -115,11 +115,11 @@
yaml="$yaml\nrubies:"
total=${#rubies[*]}
if [[ ! -z "$ZSH_VERSION" ]] ; then array_start=1 ; else array_start=0 ; fi
for (( index = $array_start ; index < $total + $array_start ; index++ )) ; do
if [[ ! -z "$rvm_debug_flag" ]] ; then
- $rvm_scripts_path/log "debug" "${rubies[$index]}: ${statuses[$index]}"
+ "$rvm_scripts_path/log" "debug" "${rubies[$index]}: ${statuses[$index]}"
fi
yaml="$yaml\n \"${rubies[$index]}\": ${statuses[$index]}"
done ; unset index array_start
\mkdir -p log
printf "$yaml" | tee -a log/summary.yaml
@@ -137,11 +137,11 @@
total=${#rubies[*]}
if [[ ! -z "$ZSH_VERSION" ]] ; then array_start=1 ; else array_start=0 ; fi
for (( index = $array_start ; index < $total + $array_start ; index++ )) ; do
if [[ ! -z "$rvm_debug_flag" ]] ; then
- $rvm_scripts_path/log "debug" "${rubies[$index]}: ${statuses[$index]}"
+ "$rvm_scripts_path/log" "debug" "${rubies[$index]}: ${statuses[$index]}"
fi
json="$json\n {\"${rubies[$index]}\": ${statuses[$index]}}"
if (( $index + 1 < $total + $array_start )) ; then json="$json, " ; fi
done ; unset index array_start
json="$json\n }\n}"
@@ -161,12 +161,12 @@
action="$1";
[[ "$#" -gt 0 ]] && shift
args="$*"
if [[ "$action" == "ruby" ]] && echo "$args" | \grep -q "^'--[^[:space:]]*'$" ; then
- $rvm_scripts_path/log "warn" "You called rvm ruby with the arguments $args which look like use options."
- $rvm_scripts_path/log "warn" "Please note that 'rvm ruby' invokes set operations instead."
+ "$rvm_scripts_path/log" "warn" "You called rvm ruby with the arguments $args which look like use options."
+ "$rvm_scripts_path/log" "warn" "Please note that 'rvm ruby' invokes set operations instead."
fi
rvm_ruby_strings="$(__rvm_expand_ruby_string "$rvm_ruby_strings")"
# Check for a single ruby && exec if present.
@@ -178,8 +178,8 @@
if [[ ! -z "$rvm_summary_flag" ]] ; then __rvm_summary ; fi
if [[ ! -z "$rvm_yaml_flag" ]] ; then __rvm_yaml ; fi
if [[ ! -z "$rvm_json_flag" ]] ; then __rvm_json ; fi
-rvm_hook="after_do" ; source $rvm_scripts_path/hook
+rvm_hook="after_do" ; source "$rvm_scripts_path/hook"
exit ${#errors[*]}