diff options
| author | Marc Cornellà <hello@mcornella.com> | 2022-01-13 17:28:15 +0100 | 
|---|---|---|
| committer | Marc Cornellà <hello@mcornella.com> | 2022-01-13 17:28:15 +0100 | 
| commit | 805427e06bc0549c7b9a4f50d3e39bbf68043f16 (patch) | |
| tree | 96d2537409501beca6a99d8ecea9660863f5af80 /tools | |
| parent | aaebe4c890394cb5d345c949aecb77aaf30b9c56 (diff) | |
| download | zsh-805427e06bc0549c7b9a4f50d3e39bbf68043f16.tar.gz zsh-805427e06bc0549c7b9a4f50d3e39bbf68043f16.tar.bz2 zsh-805427e06bc0549c7b9a4f50d3e39bbf68043f16.zip | |
fix(updater): give priority to `zstyle` settings if set (#10587)
Fixes #10587
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/check_for_upgrade.sh | 10 | 
1 files changed, 6 insertions, 4 deletions
| diff --git a/tools/check_for_upgrade.sh b/tools/check_for_upgrade.sh index 293f48edf..729d8ecb5 100644 --- a/tools/check_for_upgrade.sh +++ b/tools/check_for_upgrade.sh @@ -10,11 +10,13 @@ fi  # - auto: the update is performed automatically when it's time  # - reminder: a reminder is shown to the user when it's time to update  # - 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 -[[ "$DISABLE_UPDATE_PROMPT" != true ]] || update_mode=auto -[[ "$DISABLE_AUTO_UPDATE" != true ]] || update_mode=disabled +  # If the mode zstyle setting is not set, support old-style settings +  [[ "$DISABLE_UPDATE_PROMPT" != true ]] || update_mode=auto +  [[ "$DISABLE_AUTO_UPDATE" != true ]] || update_mode=disabled +}  # Cancel update if:  # - the automatic update is disabled. | 
