Skip to content

Commit b6d3751

Browse files
committed
test(scripts): check-regen-pending's remedy case runs only the command the refusal printed (#22485)
Claude-Session: https://claude.ai/code/session_01VZqqwTj2wsihZEbfT6yyYN Co-authored-by: Claude <noreply@anthropic.com>
1 parent cec190b commit b6d3751

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎scripts/check-regen-pending.mjs‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1702,7 +1702,9 @@ function fixtureSelfTest() {
17021702
const stuckPush = runHook('clean', ['--pre-push']);
17031703
check(' …and the push is refused with the same remedy',
17041704
stuckPush.code === 1 && stuckPush.out.includes(`--release ${unrouted}`));
1705-
const released = runHook('clean', ['--release', printed?.[1] ?? unrouted]);
1705+
// ONLY the printed command is run: a remedy the refusal does not print is not
1706+
// one a reader can follow, so no fallback spelling stands in for it here.
1707+
const released = printed ? runHook('clean', ['--release', printed[1]]) : { code: -1, out: '' };
17061708
check('THE PRINTED REMEDY WORKS: `--release` exits 0 and clears the marker',
17071709
released.code === 0 && !existsSync(marker));
17081710
const after = runHook('stale', ['--pre-push']);

0 commit comments

Comments
 (0)