mirror of https://github.com/ohmyzsh/ohmyzsh.git
parent
0e99f402cd
commit
7d32e7fc3f
|
@ -27,7 +27,7 @@ zstyle -s ':omz:update' mode update_mode || {
|
||||||
# - $ZSH is not a git repository
|
# - $ZSH is not a git repository
|
||||||
if [[ "$update_mode" = disabled ]] \
|
if [[ "$update_mode" = disabled ]] \
|
||||||
|| [[ ! -w "$ZSH" || ! -O "$ZSH" ]] \
|
|| [[ ! -w "$ZSH" || ! -O "$ZSH" ]] \
|
||||||
|| [[ ! -t 1 ]] \
|
|| [[ ! -t 1 && ${POWERLEVEL9K_INSTANT_PROMPT:-off} == off ]] \
|
||||||
|| ! command git --version 2>&1 >/dev/null \
|
|| ! command git --version 2>&1 >/dev/null \
|
||||||
|| (builtin cd -q "$ZSH"; ! command git rev-parse --is-inside-work-tree &>/dev/null); then
|
|| (builtin cd -q "$ZSH"; ! command git rev-parse --is-inside-work-tree &>/dev/null); then
|
||||||
unset update_mode
|
unset update_mode
|
||||||
|
@ -112,6 +112,11 @@ function update_ohmyzsh() {
|
||||||
local verbose_mode
|
local verbose_mode
|
||||||
zstyle -s ':omz:update' verbose verbose_mode || verbose_mode=default
|
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 ]] \
|
if [[ "$update_mode" != background-alpha ]] \
|
||||||
&& LANG= ZSH="$ZSH" zsh -f "$ZSH/tools/upgrade.sh" -i -v $verbose_mode; then
|
&& LANG= ZSH="$ZSH" zsh -f "$ZSH/tools/upgrade.sh" -i -v $verbose_mode; then
|
||||||
update_last_updated_file
|
update_last_updated_file
|
||||||
|
|
Loading…
Reference in New Issue