mirror of
https://github.com/pyenv/pyenv.git
synced 2024-11-21 20:47:00 -05:00
Restore the current working directory in rbenv-rehash
This commit is contained in:
parent
305db1c35b
commit
94d87211f9
1 changed files with 6 additions and 0 deletions
|
@ -55,6 +55,9 @@ make_shims() {
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Save the working directory.
|
||||||
|
CUR_PATH=$PWD
|
||||||
|
|
||||||
# Empty out the shims directory and make it the working directory.
|
# Empty out the shims directory and make it the working directory.
|
||||||
rm -f "$SHIM_PATH"/*
|
rm -f "$SHIM_PATH"/*
|
||||||
cd "$SHIM_PATH"
|
cd "$SHIM_PATH"
|
||||||
|
@ -68,6 +71,9 @@ make_shims ../versions/*/bin/*
|
||||||
RBENV_REHASH_PLUGINS=(/etc/rbenv.d/rehash/*.bash ${RBENV_ROOT}/rbenv.d/rehash/*.bash)
|
RBENV_REHASH_PLUGINS=(/etc/rbenv.d/rehash/*.bash ${RBENV_ROOT}/rbenv.d/rehash/*.bash)
|
||||||
shopt -u nullglob
|
shopt -u nullglob
|
||||||
|
|
||||||
|
# Restore the previous working directory.
|
||||||
|
cd "$CUR_PATH"
|
||||||
|
|
||||||
for script in ${RBENV_REHASH_PLUGINS[@]}; do
|
for script in ${RBENV_REHASH_PLUGINS[@]}; do
|
||||||
source $script
|
source $script
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in a new issue