affaan-m/ECC · error · Error
--launch and --dry-run are mutually exclusive.
Error message
--launch and --dry-run are mutually exclusive.
What it means
parseArgs tracks both launchRequested and dryRunRequested. If both are set it throws, because --dry-run means 'print the launch plan only' and --launch means 'actually open the terminal', which are contradictory. Note the default (neither flag) is already dry-run.
Source
Thrown at skills/terminal-opener/scripts/open-terminal.js:137
} else if (argument === '--detect') {
options.detect = true;
} else if (argument === '--launch') {
launchRequested = true;
options.dryRun = false;
} else if (argument === '--dry-run') {
dryRunRequested = true;
options.dryRun = true;
} else if (argument === '--json') {
options.json = true;
} else if (argument === '--help' || argument === '-h') {
options.help = true;
} else {
throw new Error(`Unknown option "${argument}"; put the executable after --.`);
}
}
if (launchRequested && dryRunRequested) {
throw new Error('--launch and --dry-run are mutually exclusive.');
}
validateTerminalName(options.terminal);
validateCwd(options.cwd);
if (!options.help && !options.detect && !options.executable) {
throw new Error('An executable is required after --.');
}
if (options.executable) validateExecutable(options.executable);
validateArgv(options.argv);
return options;
}
function unsupportedPlan(options) {
return {
ok: false,
reason: 'unsupported-terminal',
action: `Terminal "${options.terminal}" is not supported. Install WezTerm, then rerun with --terminal wezterm.`,
terminal: options.terminal,View on GitHub (pinned to 01e15490f0)
Solutions
- Choose one: drop --dry-run if you want to actually launch, or drop --launch if you only want the plan.
- Since dry-run is the default, you can omit --dry-run entirely when you want a plan.
Example fix
# before node open-terminal.js --launch --dry-run -- echo hi # after node open-terminal.js --launch -- echo hi
Defensive patterns
Strategy: validation
Validate before calling
if (argv.includes('--launch') && argv.includes('--dry-run')) {
throw new Error('--launch and --dry-run are mutually exclusive');
} Prevention
- Remember dry-run is the default; you rarely need --dry-run explicitly.
- In wrappers, branch on intent (plan vs launch) rather than unioning both flags.
When it happens
Trigger: Passing both --launch and --dry-run on the same command line. parseArgs checks the combination at line 136 after the flag loop.
Common situations: Copy-pasting flags from two sources; a wrapper script that unions both flags defensively; misunderstanding that dry-run is the default.
Related errors
- Invalid terminal name; use a simple adapter name such as wez
- Missing value for ${option}.
- Unknown option "${argument}"; put the executable after --.
- An executable is required after --.
- Multiple ECC repo roots detected: ${uniqueRepoRoots.join(',
AI-assisted analysis of affaan-m/ECC@01e15490f0 (2026-08-13).
Data as JSON: /api/errors/5540097d3a8f63d2.
Report an issue: GitHub.