Merge remote-tracking branch 'mlafeldt/rbenv-rehash'

Conflicts:
	libexec/rbenv-rehash
This commit is contained in:
Sam Stephenson 2011-12-24 18:03:10 -05:00
commit b670849ebd

View file

@ -22,7 +22,7 @@ set +o noclobber
# If we were able to obtain a lock, register a trap to clean up the # If we were able to obtain a lock, register a trap to clean up the
# prototype shim when the process exits. # prototype shim when the process exits.
trap remove_prototype_shim SIGINT SIGTERM EXIT trap remove_prototype_shim EXIT
remove_prototype_shim() { remove_prototype_shim() {
rm -f "$PROTOTYPE_SHIM_PATH" rm -f "$PROTOTYPE_SHIM_PATH"
@ -125,8 +125,7 @@ remove_stale_shims() {
} }
# Save the working directory and change to the shims directory. # Change to the shims directory.
CUR_PATH=$PWD
cd "$SHIM_PATH" cd "$SHIM_PATH"
# Create the prototype shim, then register shims for all known binaries. # Create the prototype shim, then register shims for all known binaries.
@ -135,7 +134,7 @@ shopt -s nullglob
make_shims ../versions/*/bin/* make_shims ../versions/*/bin/*
# Restore the previous working directory. # Restore the previous working directory.
cd "$CUR_PATH" cd "$OLDPWD"
# Allow plugins to register shims. # Allow plugins to register shims.
for script in $(rbenv-hooks rehash); do for script in $(rbenv-hooks rehash); do