Bash-it don't returns to the previous path after update

pull/1269/head
Eduardo Bellido Bellido 2018-11-12 22:59:14 +01:00
parent a8ee759293
commit 4df44b1fa9
1 changed files with 3 additions and 1 deletions

View File

@ -167,6 +167,8 @@ _bash-it_update() {
_about 'updates Bash-it' _about 'updates Bash-it'
_group 'lib' _group 'lib'
local old_pwd="${PWD}"
cd "${BASH_IT}" || return cd "${BASH_IT}" || return
if [ -z $BASH_IT_REMOTE ]; then if [ -z $BASH_IT_REMOTE ]; then
@ -194,7 +196,7 @@ _bash-it_update() {
else else
echo "Bash-it is up to date, nothing to do!" echo "Bash-it is up to date, nothing to do!"
fi fi
cd - &> /dev/null || return cd "${old_pwd}" &> /dev/null || return
} }
_bash-it-migrate() { _bash-it-migrate() {