affaan-m/ECC · error · Error
An executable is required after --.
Error message
An executable is required after --.
What it means
Unless --help or --detect is requested, parseArgs requires an executable after --. If no executable is supplied (no -- token, or a -- with nothing after it), this throws at line 142. --help and --detect are the only modes that do not need an executable.
Source
Thrown at skills/terminal-opener/scripts/open-terminal.js:143
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,
executable: options.executable,
argv: [...options.argv],
cwd: options.cwd,
dryRun: options.dryRun,
launchMode: options.mode === 'recover' ? 'recover' : 'mux',
command: null,View on GitHub (pinned to 01e15490f0)
Solutions
- Add '-- <executable> [args...]' to the command line.
- If you only wanted to probe or see help, pass --detect or --help instead.
Example fix
# before node open-terminal.js --terminal wezterm # after node open-terminal.js --terminal wezterm -- echo hi
Defensive patterns
Strategy: validation
Validate before calling
const hasExecutable = argv.includes('--') && argv[argv.indexOf('--') + 1] !== undefined;
const isProbeOrHelp = argv.includes('--detect') || argv.includes('--help') || argv.includes('-h');
if (!hasExecutable && !isProbeOrHelp) {
throw new Error('An executable is required after -- (or use --detect/--help)');
} Prevention
- Always terminate options with -- followed by the executable and its args.
- Use --detect or --help when you do not intend to launch a command.
When it happens
Trigger: Running with only flags and no executable, or a trailing -- with nothing after it, while not using --help or --detect.
Common situations: Forgetting the executable; intending to run --detect but omitting it; a wrapper that strips the executable token.
Related errors
- Invalid terminal name; use a simple adapter name such as wez
- Missing value for ${option}.
- Unknown option "${argument}"; put the executable after --.
- --launch and --dry-run are mutually exclusive.
- Multiple ECC repo roots detected: ${uniqueRepoRoots.join(',
AI-assisted analysis of affaan-m/ECC@01e15490f0 (2026-08-13).
Data as JSON: /api/errors/e76d746009d383a7.
Report an issue: GitHub.