From 99a634e9447729e2e05d887f878b13df7b77f006 Mon Sep 17 00:00:00 2001 From: ic-builder Date: Sun, 6 Sep 2026 09:24:59 -0500 Subject: [PATCH] [ca] fix SC2015 for CI shellcheck 0.9 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 --- docker/stepca-prod/init-stepca.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docker/stepca-prod/init-stepca.sh b/docker/stepca-prod/init-stepca.sh index 069a6e7..160980d 100755 --- a/docker/stepca-prod/init-stepca.sh +++ b/docker/stepca-prod/init-stepca.sh @@ -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 -- 2.43.0