scripts/wrapper in rvm-0.1.46 vs scripts/wrapper in rvm-0.1.47
- old
+ new
@@ -65,15 +65,10 @@
prefix="$1"
[[ "$#" -gt 0 ]] && shift
binaries="$(echo "$@" | __rvm_strip)"
-if [[ 'system' == '$ruby_string' ]]; then
- $rvm_scripts_path/log "error" "Wrapper can't be called with system rubies - sorry!"
- exit 1
-fi
-
# Default the list of binaries to those we use regularily.
if [[ -z "$binaries" ]] ; then
binaries="ruby gem irb ri rdoc rake erb testrb"
fi
@@ -96,9 +91,17 @@
if [[ "$binary_name" == "ruby" ]] ; then
destination="$rvm_bin_path/$environment_identifier"
else
destination="$rvm_bin_path/${binary_name}-${environment_identifier}"
fi
+ \rm -rf "$destination"
+ ln -nsf "$file_name" "$destination"
+ fi; unset destination
+ elif [[ "$prefix" == "--no-prefix" ]]; then
+ override_check=1
+ wrap_binary
+ if [[ -f "$file_name" ]]; then
+ destination="$rvm_bin_path/$binary_name"
\rm -rf "$destination"
ln -nsf "$file_name" "$destination"
fi; unset destination
else
symlink_binary