From b2ec1229c2bedacaa66a38b3306fbd472f528d9f Mon Sep 17 00:00:00 2001 From: Omoeba <38597972+Omoeba@users.noreply.github.com> Date: Thu, 5 Dec 2024 19:38:01 -0800 Subject: [PATCH] fix(updater): allow non-tty usage when `update_mode=auto` --- tools/check_for_upgrade.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/check_for_upgrade.sh b/tools/check_for_upgrade.sh index 1ecab5c0b..ec8325d3e 100644 --- a/tools/check_for_upgrade.sh +++ b/tools/check_for_upgrade.sh @@ -27,7 +27,7 @@ zstyle -s ':omz:update' mode update_mode || { # - $ZSH is not a git repository if [[ "$update_mode" = disabled ]] \ || [[ ! -w "$ZSH" || ! -O "$ZSH" ]] \ - || [[ ! -t 1 ]] \ + || ([[ "$update_mode" != auto ]] && [[ ! -t 1 ]]) \ || ! command git --version 2>&1 >/dev/null \ || (builtin cd -q "$ZSH"; ! command git rev-parse --is-inside-work-tree &>/dev/null); then unset update_mode