1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-12-24 13:21:57 +00:00

fix(updater): allow non-tty usage when update_mode=auto

This commit is contained in:
Omoeba 2024-12-05 19:38:01 -08:00
parent 69a6359f7c
commit b2ec1229c2
No known key found for this signature in database
GPG key ID: 3E6DB79EF9F6FD28

View file

@ -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