Skip to content

Commit f433656

Browse files
ithiria894claude
andcommitted
fix: prevent Firefox popup during E2E tests
Add --no-open flag and CCO_NO_OPEN env var to skip browser auto-open. All test server spawns now pass --no-open. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent b00451c commit f433656

4 files changed

Lines changed: 702 additions & 8 deletions

File tree

bin/cli.mjs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -137,10 +137,12 @@ if (isDistillMode) {
137137
}
138138
});
139139

140-
try {
141-
const openCmd = process.platform === 'darwin' ? 'open' : 'xdg-open';
142-
execSync(`${openCmd} http://localhost:${port}`, { stdio: 'ignore' });
143-
} catch {
144-
// Browser didn't open, user can navigate manually
140+
if (!args.includes('--no-open') && process.env.CCO_NO_OPEN !== '1') {
141+
try {
142+
const openCmd = process.platform === 'darwin' ? 'open' : 'xdg-open';
143+
execSync(`${openCmd} http://localhost:${port}`, { stdio: 'ignore' });
144+
} catch {
145+
// Browser didn't open, user can navigate manually
146+
}
145147
}
146148
}

0 commit comments

Comments
 (0)