diff options
author | Tuowen Zhao <ztuowen@gmail.com> | 2023-03-18 16:23:39 -0700 |
---|---|---|
committer | Tuowen Zhao <ztuowen@gmail.com> | 2023-03-18 16:23:39 -0700 |
commit | 4b0bbc0b263a150eb9a9b59f196914629be06a9b (patch) | |
tree | 619723cfa449f93149b766ee397f85ce2acef5f7 /tools/check_for_upgrade.sh | |
parent | db7efd2336e4dbe6abf321b00dbc11bc5afb1355 (diff) | |
parent | 72732a224e886933df6b64a49ec6f5e94c884612 (diff) | |
download | zsh-4b0bbc0b263a150eb9a9b59f196914629be06a9b.tar.gz zsh-4b0bbc0b263a150eb9a9b59f196914629be06a9b.tar.bz2 zsh-4b0bbc0b263a150eb9a9b59f196914629be06a9b.zip |
Merge remote-tracking branch 'github/master'
Diffstat (limited to 'tools/check_for_upgrade.sh')
-rw-r--r-- | tools/check_for_upgrade.sh | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/check_for_upgrade.sh b/tools/check_for_upgrade.sh index 3a6bb6555..734714c94 100644 --- a/tools/check_for_upgrade.sh +++ b/tools/check_for_upgrade.sh @@ -21,9 +21,11 @@ zstyle -s ':omz:update' mode update_mode || { # Cancel update if: # - the automatic update is disabled. # - the current user doesn't have write permissions nor owns the $ZSH directory. +# - is not run from a tty # - git is unavailable on the system. if [[ "$update_mode" = disabled ]] \ || [[ ! -w "$ZSH" || ! -O "$ZSH" ]] \ + || [[ ! -t 1 ]] \ || ! command git --version 2>&1 >/dev/null; then unset update_mode return |