summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/check_for_upgrade.sh5
-rwxr-xr-xtools/upgrade.sh3
2 files changed, 4 insertions, 4 deletions
diff --git a/tools/check_for_upgrade.sh b/tools/check_for_upgrade.sh
index d0ceba92d..29a48b880 100644
--- a/tools/check_for_upgrade.sh
+++ b/tools/check_for_upgrade.sh
@@ -24,8 +24,9 @@ function update_last_updated_file() {
}
function update_ohmyzsh() {
- ZSH="$ZSH" zsh -f "$ZSH/tools/upgrade.sh" --interactive
- update_last_updated_file
+ if ZSH="$ZSH" zsh -f "$ZSH/tools/upgrade.sh" --interactive; then
+ update_last_updated_file
+ fi
}
() {
diff --git a/tools/upgrade.sh b/tools/upgrade.sh
index 358242d0f..417e06fe8 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"
@@ -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!"