From 48ce3edb4ba3a35595d3339bfa5d8ba76f19343a Mon Sep 17 00:00:00 2001 From: disinto-admin Date: Mon, 20 Apr 2026 10:47:12 +0000 Subject: [PATCH] fix: convert bash array to POSIX for-loop in caddyfile-routing-test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Step ran in alpine:3.19 with default /bin/sh (busybox ash) which does not support bash array syntax. REQUIRED_HANDLERS=(...) + "${ARR[@]}" failed with "syntax error: unexpected (". Inlined the handler list into a single space-separated for-loop that works under POSIX sh. No behavioral change; same 6 handlers checked. Fixes edge-subpath/caddyfile-routing-test exit 2 on pipelines targeting fix/issue-1025-3 — see #1025. --- .woodpecker/edge-subpath.yml | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/.woodpecker/edge-subpath.yml b/.woodpecker/edge-subpath.yml index 48ffa74..2c11980 100644 --- a/.woodpecker/edge-subpath.yml +++ b/.woodpecker/edge-subpath.yml @@ -130,17 +130,9 @@ steps: echo "=== Validating Caddyfile routing blocks ===" # Check that all required subpath handlers exist - REQUIRED_HANDLERS=( - "handle /forge/\*" - "handle /ci/\*" - "handle /staging/\*" - "handle /chat/login" - "handle /chat/oauth/callback" - "handle /chat/\*" - ) - + # POSIX-safe loop (alpine /bin/sh has no arrays) FAILED=0 - for handler in "$${REQUIRED_HANDLERS[@]}"; do + for handler in "handle /forge/\*" "handle /ci/\*" "handle /staging/\*" "handle /chat/login" "handle /chat/oauth/callback" "handle /chat/\*"; do if grep -q "$handler" "$CADDYFILE"; then echo "[PASS] Found handler: $handler" else