Skip to content

Commit

Permalink
Bash-it don't returns to the previous path after update
Browse files Browse the repository at this point in the history
  • Loading branch information
edubxb committed Nov 12, 2018
1 parent a8ee759 commit 4df44b1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/helpers.bash
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,8 @@ _bash-it_update() {
_about 'updates Bash-it'
_group 'lib'

local old_pwd="${PWD}"

cd "${BASH_IT}" || return

if [ -z $BASH_IT_REMOTE ]; then
Expand Down Expand Up @@ -194,7 +196,7 @@ _bash-it_update() {
else
echo "Bash-it is up to date, nothing to do!"
fi
cd - &> /dev/null || return
cd "${old_pwd}" &> /dev/null || return
}

_bash-it-migrate() {
Expand Down

0 comments on commit 4df44b1

Please sign in to comment.