From ae3a8e1803ba4c42a4f5dbecbf1af9d9f50b215f Mon Sep 17 00:00:00 2001 From: openhands Date: Sat, 21 Mar 2026 19:22:02 +0000 Subject: [PATCH] fix: use awk instead of sed for RESOURCES.md entry extraction The sed range pattern terminated on ## which is the first line of the entry content, yielding an empty result for all valid procurement files. awk reads from the header to EOF without ambiguity. Co-Authored-By: Claude Opus 4.6 (1M context) --- vault/vault-fire.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/vault/vault-fire.sh b/vault/vault-fire.sh index 136e9ed..cb807c2 100755 --- a/vault/vault-fire.sh +++ b/vault/vault-fire.sh @@ -73,9 +73,10 @@ if [ "$IS_PROCUREMENT" = true ]; then log "$ACTION_ID: firing procurement request" # Extract the proposed RESOURCES.md entry from the markdown file. - # The entry is between "## Proposed RESOURCES.md Entry" and the next "## " heading or EOF. + # Everything after the "## Proposed RESOURCES.md Entry" heading to EOF. + # Uses awk because the entry itself contains ## headings (## ). ENTRY="" - ENTRY=$(sed -n '/^## Proposed RESOURCES\.md Entry/,/^## /{/^## Proposed RESOURCES\.md Entry/d;/^## /d;p}' "$ACTION_FILE" 2>/dev/null || true) + ENTRY=$(awk '/^## Proposed RESOURCES\.md Entry/{found=1; next} found{print}' "$ACTION_FILE" 2>/dev/null || true) # Strip leading/trailing blank lines and markdown code fences ENTRY=$(echo "$ENTRY" | sed '/^```/d' | sed -e '/./,$!d' -e :a -e '/^\n*$/{$d;N;ba;}')