Quality Debt: ShellCheck SC2015
Source: Daily quality sweep 2026-03-25
File: bin/deploy.sh
Severity: Error (SC2015)
Finding
Note that A && B || C is not if-then-else. C may run when A is true. [SC2015]
The A && B || C pattern is not equivalent to if A; then B; else C; fi. If B exits non-zero, C will run unexpectedly. This can cause silent failures in deploy scripts.
Fix
Replace A && B || C patterns with explicit if/then/else blocks:
# Before (buggy)
some_command && success_action || failure_action
# After (correct)
if some_command; then
success_action
else
failure_action
fi
Acceptance Criteria
Quality Debt: ShellCheck SC2015
Source: Daily quality sweep 2026-03-25
File:
bin/deploy.shSeverity: Error (SC2015)
Finding
Note that A && B || C is not if-then-else. C may run when A is true. [SC2015]The
A && B || Cpattern is not equivalent toif A; then B; else C; fi. IfBexits non-zero,Cwill run unexpectedly. This can cause silent failures in deploy scripts.Fix
Replace
A && B || Cpatterns with explicitif/then/elseblocks:Acceptance Criteria
bin/deploy.shreplaced with explicit if/then/elseshellcheck bin/deploy.shreports zero SC2015 violations