diff options
| author | Marc Cornellà <marc@mcornella.com> | 2025-02-13 12:22:23 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-13 12:22:23 +0100 |
| commit | 7d32e7fc3fb56032252548a690744a26c3ac3059 (patch) | |
| tree | 0df04a156e5b5dde5af055e1092a076b41a3341d | |
| parent | 0e99f402cd5a335042559396ae300a7668bac933 (diff) | |
| download | zsh-7d32e7fc3fb56032252548a690744a26c3ac3059.tar.gz zsh-7d32e7fc3fb56032252548a690744a26c3ac3059.tar.bz2 zsh-7d32e7fc3fb56032252548a690744a26c3ac3059.zip | |
fix(updater): detect p10k instant prompt (#12971)
Fixes #12781
| -rw-r--r-- | tools/check_for_upgrade.sh | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/check_for_upgrade.sh b/tools/check_for_upgrade.sh index 1ecab5c0b..35391ea70 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 ]] \ + || [[ ! -t 1 && ${POWERLEVEL9K_INSTANT_PROMPT:-off} == off ]] \ || ! 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 @@ -112,6 +112,11 @@ function update_ohmyzsh() { local verbose_mode zstyle -s ':omz:update' verbose verbose_mode || verbose_mode=default + # Force verbose mode to silent if p10k instant prompt is enabled + if [[ ${POWERLEVEL9K_INSTANT_PROMPT:-off} != "off" ]]; then + verbose_mode=silent + fi + if [[ "$update_mode" != background-alpha ]] \ && LANG= ZSH="$ZSH" zsh -f "$ZSH/tools/upgrade.sh" -i -v $verbose_mode; then update_last_updated_file |
