fix: agent-smoke.sh: use [(][)] instead of \(\) for BusyBox grep ERE compat

BusyBox grep (Alpine CI) does not treat \( as a literal paren in -E mode,
causing inject_formula to appear undefined even though it is defined in
lib/agent-session.sh. Using [(][)] is unambiguous in both GNU grep and
BusyBox grep.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
openhands 2026-03-18 21:24:27 +00:00
parent a3abf9f37a
commit 7e008991a7

View file

@ -20,7 +20,7 @@ FAILED=0
# Extract function names defined in a bash script (top-level or indented).
get_fns() {
local f="$1"
grep -Eo '[a-zA-Z_][a-zA-Z0-9_]+[[:space:]]*\(\)' "$f" 2>/dev/null \
grep -Eo '[a-zA-Z_][a-zA-Z0-9_]+[[:space:]]*[(][)]' "$f" 2>/dev/null \
| sed 's/[[:space:]]*()//' | sort -u || true
}