diff options
author | Lucas Larson <91468+LucasLarson@users.noreply.github.com> | 2020-09-09 05:07:46 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-09 11:07:46 +0200 |
commit | a55a30ec3933704e1a4a77f533fe7a21266d97fd (patch) | |
tree | c746c687d09e6a87bc56faf756acb02b973a59e5 /tools/upgrade.sh | |
parent | 708ea42384d378343a590fc34a3dee536a1651df (diff) | |
download | zsh-a55a30ec3933704e1a4a77f533fe7a21266d97fd.tar.gz zsh-a55a30ec3933704e1a4a77f533fe7a21266d97fd.tar.bz2 zsh-a55a30ec3933704e1a4a77f533fe7a21266d97fd.zip |
update: return git error code on failure (#9238)
Fixes #9237
Diffstat (limited to 'tools/upgrade.sh')
-rw-r--r-- | tools/upgrade.sh | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/upgrade.sh b/tools/upgrade.sh index a71dec88b..e005519d6 100644 --- a/tools/upgrade.sh +++ b/tools/upgrade.sh @@ -68,6 +68,7 @@ then printf "${BLUE}${BOLD}%s ${UNDER}%s${RESET}\n" "Want to get involved in the community? Join our Discord:" "https://discord.gg/ohmyzsh" printf "${BLUE}${BOLD}%s ${UNDER}%s${RESET}\n" "Get your Oh My Zsh swag at:" "https://shop.planetargon.com/collections/oh-my-zsh" else + status=$? printf "${RED}%s${RESET}\n" 'There was an error updating. Try again later?' fi @@ -76,3 +77,6 @@ case "$resetAutoStash" in "") git config --unset rebase.autoStash ;; *) git config rebase.autoStash "$resetAutoStash" ;; esac + +# Exit with `1` if the update failed +exit $status |