mirror of
https://oauth2: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@github.com/m1ngsama/automa.git
synced 2026-05-10 19:11:07 +08:00
fix: use pre-increment to avoid set -e trap on ((0))
((ok++)) when ok=0 evaluates to 0 (falsy), which set -e treats as failure. Use ((++ok)) so the expression always returns >= 1.
This commit is contained in:
parent
ccb424286c
commit
81b4d51f80
1 changed files with 2 additions and 2 deletions
4
automa
4
automa
|
|
@ -372,7 +372,7 @@ cmd_deploy() {
|
|||
local ok=0 fail=0
|
||||
for name in "$@"; do
|
||||
echo ""
|
||||
if deploy_project "$name"; then ((ok++)); else ((fail++)); fi
|
||||
if deploy_project "$name"; then ((++ok)); else ((++fail)); fi
|
||||
done
|
||||
deploy_summary $ok $fail
|
||||
return
|
||||
|
|
@ -439,7 +439,7 @@ cmd_deploy() {
|
|||
local ok=0 fail=0
|
||||
for name in "${selected[@]}"; do
|
||||
echo ""
|
||||
if deploy_project "$name"; then ((ok++)); else ((fail++)); fi
|
||||
if deploy_project "$name"; then ((++ok)); else ((++fail)); fi
|
||||
done
|
||||
|
||||
deploy_summary $ok $fail
|
||||
|
|
|
|||
Loading…
Reference in a new issue