diff options
author | Marc Cornellà <marc.cornella@live.com> | 2021-01-21 11:52:09 +0100 |
---|---|---|
committer | Marc Cornellà <marc.cornella@live.com> | 2021-01-21 11:52:09 +0100 |
commit | d978f385e52a19f2fd41e8c7ceb2f7c0a4dfc56c (patch) | |
tree | 0717cdd7f5c8b2727f69d9fa06146c7f49bd3a50 /tools | |
parent | cd4918c2cdb6613cf77ea8f6f29e1930bd7f4bf5 (diff) | |
download | zsh-d978f385e52a19f2fd41e8c7ceb2f7c0a4dfc56c.tar.gz zsh-d978f385e52a19f2fd41e8c7ceb2f7c0a4dfc56c.tar.bz2 zsh-d978f385e52a19f2fd41e8c7ceb2f7c0a4dfc56c.zip |
fix(updater): refresh date of last update only on successful update
Diffstat (limited to 'tools')
-rw-r--r-- | tools/check_for_upgrade.sh | 4 | ||||
-rwxr-xr-x | tools/upgrade.sh | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/tools/check_for_upgrade.sh b/tools/check_for_upgrade.sh index d0ceba92d..88e521eea 100644 --- a/tools/check_for_upgrade.sh +++ b/tools/check_for_upgrade.sh @@ -25,7 +25,9 @@ function update_last_updated_file() { function update_ohmyzsh() { ZSH="$ZSH" zsh -f "$ZSH/tools/upgrade.sh" --interactive - update_last_updated_file + if [[ "$?" = (0|80) ]]; then + update_last_updated_file + fi } () { diff --git a/tools/upgrade.sh b/tools/upgrade.sh index 358242d0f..4b97540d6 100755 --- a/tools/upgrade.sh +++ b/tools/upgrade.sh @@ -1,7 +1,7 @@ #!/usr/bin/env zsh if [ -z "$ZSH_VERSION" ]; then - exec zsh "$0" + exec zsh "$0" "$@" fi cd "$ZSH" |