fix: agent-smoke get_fns — use literal [ \t] for busybox awk compat

Busybox awk in Alpine CI has incomplete POSIX character class support;
[[:space:]] intermittently fails to match, causing function definitions
to be missed from LIB_FUNS. Replace with literal [ \t] patterns.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
openhands 2026-03-20 12:02:40 +00:00
parent c3714380d7
commit 9c51f4dbe2

View file

@ -21,9 +21,9 @@ FAILED=0
# Uses awk instead of grep -Eo for busybox/Alpine compatibility (#296).
get_fns() {
local f="$1"
awk '/^[[:space:]]*[a-zA-Z_][a-zA-Z0-9_]+[[:space:]]*\(\)/ {
sub(/^[[:space:]]+/, "")
sub(/[[:space:]]*\(\).*/, "")
awk '/^[ \t]*[a-zA-Z_][a-zA-Z0-9_]+[ \t]*\(\)/ {
sub(/^[ \t]+/, "")
sub(/[ \t]*\(\).*/, "")
print
}' "$f" 2>/dev/null | sort -u || true
}