Skip to content

Commit d0fb951

Browse files
rjwaltersclaude
andauthored
fix(release): guard _all_tags read loop against empty elements (Phase 1.5) (#3504)
The Phase 1.5 CHANGELOG completeness gate can report a phantom "missing" tag with an empty name and bogus commit count under bash 3.2 when the process substitution `< <(git tag --sort=-v:refname)` leaves an empty element in the _all_tags array. Skip empty `_t` values inside the read loop so the array only ever holds real tag names. Verified by extracting the gate logic and running on bash 3.2: - Unmodified CHANGELOG.md (all 5 recent tags present) -> "OK" (no phantom) - Synthesized CHANGELOG with [0.10.2] removed -> correctly flags "v0.10.2 (2026-06-15, 5 commits)" Closes #3501 Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 8f6cc4b commit d0fb951

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

defaults/.claude/commands/loom/release.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ else
6262
# Use a portable read loop (avoids `mapfile`, which is bash 4+ only).
6363
_all_tags=()
6464
while IFS= read -r _t; do
65+
[ -n "$_t" ] || continue # defensive: skip empty lines from process substitution
6566
_all_tags+=("$_t")
6667
done < <(git tag --sort=-v:refname)
6768
_limit=$RECENT_TAG_COUNT

0 commit comments

Comments
 (0)