mirror of
https://github.com/robbyrussell/oh-my-zsh.git
synced 2026-09-28 22:16:05 +02:00
fix(updater): address cooldown review feedback
Pass cooldown into upgrade.sh as -c, extract the update helpers, and only prompt when a cooldown-eligible commit would actually move HEAD.
This commit is contained in:
+4
-1
@@ -903,8 +903,11 @@ function _omz::update {
|
||||
}
|
||||
|
||||
# Run update script
|
||||
local verbose_mode cooldown_days
|
||||
zstyle -s ':omz:update' verbose verbose_mode || verbose_mode=default
|
||||
ZSH="$ZSH" command zsh -f "$ZSH/tools/upgrade.sh" -i -v $verbose_mode || return $?
|
||||
zstyle -s ':omz:update' cooldown cooldown_days || cooldown_days=0
|
||||
[[ $cooldown_days == <-> ]] || cooldown_days=0
|
||||
ZSH="$ZSH" command zsh -f "$ZSH/tools/upgrade.sh" -i -v $verbose_mode -c $cooldown_days || return $?
|
||||
|
||||
# Update last updated file
|
||||
zmodload zsh/datetime
|
||||
|
||||
Reference in New Issue
Block a user