Skip to content

Commit

Permalink
update: return git error code on failure (ohmyzsh#9238)
Browse files Browse the repository at this point in the history
  • Loading branch information
LucasLarson authored and grantstephens committed Jun 23, 2021
1 parent aa5bea7 commit cb51d82
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tools/upgrade.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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

0 comments on commit cb51d82

Please sign in to comment.