pitfalls dry-run guard: cli/lib/git-ignore.ts's dry branch returns the planned .gitignore line (the plan, printed by its callers), allowed with the reason

This commit is contained in:
CRTkafa 2026-10-14 05:26:14 +08:00
parent fb3a7c186b
commit 346bf61166

View file

@ -149,7 +149,10 @@ describe('dry runs show a plan, not a count', () => {
});
// TODO: remove each entry once its branch lands (the test fails on a stale entry).
const ALLOW: Record<string, string> = {};
const ALLOW: Record<string, string> = {
// the dry branch returns the .gitignore line it would add (the plan itself); the callers print it
'cli/lib/git-ignore.ts': 'returns the planned .gitignore line',
};
test('no write command in cli/** leaves its --dry branch after printing only a count', () => {
const root = join(import.meta.dir, '..');
const flagged: string[] = [];