[ca] fix SC2015 for CI shellcheck 0.9
ci / audit (pull_request) Successful in 23s

Unambiguous if-form for the two-condition guard. CI (node:20-bookworm,
Debian shellcheck 0.9) flags the A && B || C pattern where the koalaman
stable docker path passed. No behavior change.

CI evidence: https://git.knownelement.com/KNEL/ca/actions/runs/117821
Ticket: https://projects.knownelement.com/issues/784
This commit is contained in:
2026-09-06 09:24:59 -05:00
parent 0f607c1e41
commit 99a634e944
+3 -1
View File
@@ -22,7 +22,9 @@ ROOT_KEY="/root/ca-root/root.key"
IMAGE="smallstep/step-ca@sha256:e9e8fa3262bf37b130962ffddbf6a64ac188f0bbb80959cf3ddc04c6bf294c3d"
TAILNET_IP="$(tailscale ip -4)"
[ -f "$ROOT_CRT" ] && [ -f "$ROOT_KEY" ] || { echo "FAIL: fleet root not found at $ROOT_CRT/$ROOT_KEY" >&2; exit 1; }
if [ ! -f "$ROOT_CRT" ] || [ ! -f "$ROOT_KEY" ]; then
echo "FAIL: fleet root not found at $ROOT_CRT/$ROOT_KEY" >&2; exit 1
fi
[ -n "$TAILNET_IP" ] || { echo "FAIL: no tailscale IP" >&2; exit 1; }
if [ -d "$DATA" ] && [ "${1:-}" != "--reinit" ]; then
echo "FAIL: $DATA exists (pass --reinit to wipe and redo)" >&2; exit 1