Skip to content

Commit 5326c3b

Browse files
committed
Address third round of Copilot review comments on PR #120
- aggregate.ts: use strict === true check for isTemplate (field is optional; falsy on undefined would silently skip the guard) - output.ts: shell-quote --exclude-extracts values in buildReplayCommand (file paths can contain spaces or shell metacharacters) - output.test.ts: update assertions to expect quoted values
1 parent c858df8 commit 5326c3b

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/aggregate.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ export function aggregate(
9898
for (const m of matches) {
9999
if (excludedRepos.has(m.repoFullName)) continue;
100100
if (!includeArchived && m.archived) continue;
101-
if (excludeTemplates && m.isTemplate) continue;
101+
if (excludeTemplates && m.isTemplate === true) continue;
102102
// Fix: when a regex filter is active, replace each TextMatch's API-provided
103103
// segments (which point at the literal search term) with segments derived
104104
// from the actual regex match positions — see issue #111 / fix highlight bug

src/output.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ describe("buildReplayCommand", () => {
117117
}),
118118
];
119119
const cmd = buildReplayCommand(groups, QUERY, ORG, new Set(), new Set());
120-
expect(cmd).toContain("--exclude-extracts repoA:b.ts:1");
120+
expect(cmd).toContain("--exclude-extracts 'repoA:b.ts:1'");
121121
});
122122

123123
it("does not double-add pre-existing exclusions", () => {

src/output.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ export function buildReplayCommand(
8282
}
8383
}
8484
if (excludedExtractsList.length > 0) {
85-
parts.push(`--exclude-extracts ${excludedExtractsList.join(",")}`);
85+
parts.push(`--exclude-extracts ${shellQuote(excludedExtractsList.join(","))}`);
8686
}
8787

8888
if (format && format !== "markdown") {

0 commit comments

Comments
 (0)