mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-25 17:57:34 +08:00
fix(updater): give priority to zstyle
settings if set (#10587)
Fixes #10587
This commit is contained in:
parent
aaebe4c890
commit
805427e06b
|
@ -10,11 +10,13 @@ fi
|
||||||
# - auto: the update is performed automatically when it's time
|
# - auto: the update is performed automatically when it's time
|
||||||
# - reminder: a reminder is shown to the user when it's time to update
|
# - reminder: a reminder is shown to the user when it's time to update
|
||||||
# - disabled: automatic update is turned off
|
# - disabled: automatic update is turned off
|
||||||
zstyle -s ':omz:update' mode update_mode || update_mode=prompt
|
zstyle -s ':omz:update' mode update_mode || {
|
||||||
|
update_mode=prompt
|
||||||
|
|
||||||
# Support old-style settings
|
# If the mode zstyle setting is not set, support old-style settings
|
||||||
[[ "$DISABLE_UPDATE_PROMPT" != true ]] || update_mode=auto
|
[[ "$DISABLE_UPDATE_PROMPT" != true ]] || update_mode=auto
|
||||||
[[ "$DISABLE_AUTO_UPDATE" != true ]] || update_mode=disabled
|
[[ "$DISABLE_AUTO_UPDATE" != true ]] || update_mode=disabled
|
||||||
|
}
|
||||||
|
|
||||||
# Cancel update if:
|
# Cancel update if:
|
||||||
# - the automatic update is disabled.
|
# - the automatic update is disabled.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user