scripts/repair in rvm-1.0.4 vs scripts/repair in rvm-1.0.5

- old
+ new

@@ -8,18 +8,19 @@ } # Removes stale symlinks in $rvm_bin_path, likely # related to wrappers. repair_symlinks() { - __rvm_pushpop "$rvm_bin_path" - for executable_name in $(\find \. -type l); do - [[ -e "$executable_name" || "$(readlink "$executable_name")" != "$rvm_wrappers_path/"* ]] && continue - if [[ -f "$executable_name" ]] ; then - "$rvm_scripts_path/log" "info" "Removing stale symlink from $(basename "$executable_name")" - \rm -f "$executable_name" - fi - done; unset executable_name - __rvm_pushpop + ( + builtin cd "$rvm_bin_path" + for executable_name in $(\find \. -type l); do + [[ -e "$executable_name" || "$(readlink "$executable_name")" != "$rvm_wrappers_path/"* ]] && continue + if [[ -f "$executable_name" ]] ; then + "$rvm_scripts_path/log" "info" "Removing stale symlink from $(basename "$executable_name")" + \rm -f "$executable_name" + fi + done + ) } # Regenerates each symlink file. repair_environments() { for environment_name in $(\ls "$rvm_environments_path"); do