diff --git a/.woodpecker/agent-smoke.sh b/.woodpecker/agent-smoke.sh index 0d2a016..2e8eb9c 100644 --- a/.woodpecker/agent-smoke.sh +++ b/.woodpecker/agent-smoke.sh @@ -21,9 +21,12 @@ FAILED=0 # Uses awk instead of grep -Eo for busybox/Alpine compatibility (#296). get_fns() { local f="$1" - awk '/^[ \t]*[a-zA-Z_][a-zA-Z0-9_]+[ \t]*\(\)/ { - sub(/^[ \t]+/, "") - sub(/[ \t]*\(\).*/, "") + # Use POSIX character classes and bracket-escaped parens for BusyBox awk + # compatibility (BusyBox awk does not expand \t to tab in character classes + # and may handle \( differently in ERE patterns). + awk '/^[[:space:]]*[a-zA-Z_][a-zA-Z0-9_]+[[:space:]]*[(][)]/ { + sub(/^[[:space:]]+/, "") + sub(/[[:space:]]*[(][)].*/, "") print }' "$f" 2>/dev/null | sort -u || true }