Skip to content

Commit 7f8d9bf

Browse files
committed
Fix extract_scope code block guard and bash 3.2 array expansion portability
1 parent 89418e0 commit 7f8d9bf

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

.claude/skills/check-code-attribution/find-attribution-candidates.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ extract_scope() {
279279
awk -v target="$heading" '
280280
/^## / { in_target = ($0 == target); in_scope = 0; next }
281281
in_target && /^### Scope/ { in_scope = 1; next }
282-
in_target && in_scope && /^(## |---)/ { exit }
282+
in_target && in_scope && !in_code && /^(## |---)/ { exit }
283283
in_target && in_scope && /^```/ { in_code = !in_code; next }
284284
in_target && in_scope && !in_code { gsub(/^[[:space:]]+|[[:space:]]+$/, ""); if ($0 != "") print }
285285
' "$notices_path"
@@ -475,7 +475,7 @@ while IFS=$'\t' read -r status filepath old_filepath; do
475475
fi
476476

477477
# Format reasons as comma-separated string
478-
reasons_str=$(printf '%s, ' "${reasons[@]}" | sed 's/, $//')
478+
reasons_str=$(printf '%s, ' "${reasons[@]+${reasons[@]}}" | sed 's/, $//')
479479

480480
# Output structured block
481481
echo "---"

0 commit comments

Comments
 (0)