Skip to content

fix: write duplicate ignore targets only once - #22

Merged
royalpinto007 merged 2 commits into
AgentPostmortem:mainfrom
Gambit-Checkmate:fix/deduplicate-ignore-targets
Sep 8, 2026
Merged

fix: write duplicate ignore targets only once#22
royalpinto007 merged 2 commits into
AgentPostmortem:mainfrom
Gambit-Checkmate:fix/deduplicate-ignore-targets

Conversation

@Gambit-Checkmate

Copy link
Copy Markdown
Contributor

What does this PR do?

--targets cursor,gemini,cursor currently writes .cursorignore twice and reports it as both created and updated in the same run. Deduplicate targets at the ignore-writing boundary, retaining their first-requested order. The regression test invokes the CLI and checks that its JSON report contains each written file exactly once.

Closes #17.

Checklist

  • Tests pass (npm test: 12 passed, including the runner's two fixture modules)
  • Updated docs / README if behavior changed
  • Added a CHANGELOG.md entry and patch version bump as requested by the contribution guide
  • Followed the existing code style

Notes

The new regression test was run before the fix and failed because the report contained two additional updated entries for the duplicate targets. After the fix, the complete test suite and git diff --check pass (Windows, Node.js).

AI assistance was used to implement this change and run the checks above.

@royalpinto007
royalpinto007 merged commit 96aa551 into AgentPostmortem:main Sep 8, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Duplicate --targets writes/reports the same file twice

2 participants