From d978f385e52a19f2fd41e8c7ceb2f7c0a4dfc56c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= Date: Thu, 21 Jan 2021 11:52:09 +0100 Subject: [PATCH] fix(updater): refresh date of last update only on successful update --- tools/check_for_upgrade.sh | 4 +++- 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"