mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-05 01:46:46 +01:00
fix(update): don't error on upgrade no-op (#9685)
* Don't error on upgrade no-op No error code is required for a non failure scenario. * Manually check whether changes were pulled in `omz update` Co-authored-by: Marc Cornellà <hello@mcornella.com>
This commit is contained in:
parent
9a9f383192
commit
6fbad5bf72
3 changed files with 5 additions and 6 deletions
|
|
@ -24,8 +24,7 @@ function update_last_updated_file() {
|
|||
}
|
||||
|
||||
function update_ohmyzsh() {
|
||||
ZSH="$ZSH" zsh -f "$ZSH/tools/upgrade.sh" --interactive
|
||||
if [[ "$?" = (0|80) ]]; then
|
||||
if ZSH="$ZSH" zsh -f "$ZSH/tools/upgrade.sh" --interactive; then
|
||||
update_last_updated_file
|
||||
fi
|
||||
}
|
||||
|
|
|
|||
|
|
@ -66,7 +66,6 @@ if git pull --rebase --stat origin master; then
|
|||
# Check if it was really updated or not
|
||||
if [[ "$(git rev-parse HEAD)" = "$last_commit" ]]; then
|
||||
message="Oh My Zsh is already at the latest version."
|
||||
ret=80 # non-zero exit code to indicate no changes pulled
|
||||
else
|
||||
message="Hooray! Oh My Zsh has been updated!"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue