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:
@@ -22,7 +22,9 @@ ROOT_KEY="/root/ca-root/root.key"
|
|||||||
IMAGE="smallstep/step-ca@sha256:e9e8fa3262bf37b130962ffddbf6a64ac188f0bbb80959cf3ddc04c6bf294c3d"
|
IMAGE="smallstep/step-ca@sha256:e9e8fa3262bf37b130962ffddbf6a64ac188f0bbb80959cf3ddc04c6bf294c3d"
|
||||||
TAILNET_IP="$(tailscale ip -4)"
|
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; }
|
[ -n "$TAILNET_IP" ] || { echo "FAIL: no tailscale IP" >&2; exit 1; }
|
||||||
if [ -d "$DATA" ] && [ "${1:-}" != "--reinit" ]; then
|
if [ -d "$DATA" ] && [ "${1:-}" != "--reinit" ]; then
|
||||||
echo "FAIL: $DATA exists (pass --reinit to wipe and redo)" >&2; exit 1
|
echo "FAIL: $DATA exists (pass --reinit to wipe and redo)" >&2; exit 1
|
||||||
|
|||||||
Reference in New Issue
Block a user