fix: remove local -A OPTS that shadows caller's parallel flag (#774)

This commit is contained in:
Pedro Pombeiro 2026-03-24 08:49:40 +01:00 committed by GitHub
parent 61a0244bb4
commit e88ed77319
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -3398,10 +3398,12 @@ print -- "\nAvailable ice-modifiers:\n\n${ice_order[*]}"
local -F2 SECONDS=0
# Always run quietly during bulk updates
local -A OPTS
# Silence self-update during bulk updates, then restore the original quiet state
# (avoid re-declaring OPTS as local — it would shadow the caller's flags like --parallel)
local _saved_quiet=${OPTS[opt_-q,--quiet]:-0}
OPTS[opt_-q,--quiet]=1
.zinit-self-update
OPTS[opt_-q,--quiet]=$_saved_quiet
[[ $2 = restart ]] && \
+zi-log "{msg2}Restarting the update with the new codebase loaded.{rst}"$'\n'