diff options
author | Marc Cornellà <hello@mcornella.com> | 2022-03-28 16:33:03 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-28 16:33:03 +0200 |
commit | 9e967b4eccbe26701315860a3b0bad01fde725c8 (patch) | |
tree | dff472042c24b956f480369902e0dab7fdd686e9 /tools | |
parent | 3f214329d631b3ae39d6b283262c77819a0078de (diff) | |
download | zsh-9e967b4eccbe26701315860a3b0bad01fde725c8.tar.gz zsh-9e967b4eccbe26701315860a3b0bad01fde725c8.tar.bz2 zsh-9e967b4eccbe26701315860a3b0bad01fde725c8.zip |
fix(installer): exit install directory on setup (#10804)
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/install.sh | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/install.sh b/tools/install.sh index f04d0dc9c..495ad2c11 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -285,10 +285,15 @@ setup_ohmyzsh() { && git remote add origin "$REMOTE" \ && git fetch --depth=1 origin \ && git checkout -b "$BRANCH" "origin/$BRANCH" || { - [ ! -d "$ZSH" ] || rm -rf "$ZSH" 2>/dev/null + [ ! -d "$ZSH" ] || { + cd - + rm -rf "$ZSH" 2>/dev/null + } fmt_error "git clone of oh-my-zsh repo failed" exit 1 } + # Exit installation directory + cd - echo } |