affaan-m/ECC · error
Non-interactive setup requires --yes.
Error message
Non-interactive setup requires --yes.
What it means
main throws this when the planned setup requires a confirmation (needsConfirmation is true) but the session is not interactive, and --yes was not passed. Confirmation normally happens via a readline prompt, which cannot run without a terminal, so non-interactive runs must pre-authorize with --yes.
Solutions
- Add --yes (or -y) to the command: `ecc setup --mode claude-plugin --scope project --yes`.
- Keep --dry-run in pipelines if changes should not be applied without review.
- Run interactively in a TTY if you want the confirmation prompt instead.
Example fix
// before # non-interactive CI npx ecc setup --mode claude-plugin --scope project // after npx ecc setup --mode claude-plugin --scope project --yes
Defensive patterns
Strategy: validation
Validate before calling
const has = (f) => argv.includes(f);
if (!has('--yes') && !has('--dry-run') && !process.stdout.isTTY) {
throw new Error('Non-interactive setup requires --yes.');
} Type guard
const isInteractive = () => Boolean(process.stdout.isTTY && process.stdin.isTTY);
Try / catch
try {
await runSetup(rawArgs);
} catch (err) {
if (err.message.includes('Non-interactive setup requires --yes')) {
console.error(err.message);
process.exitCode = 2;
} else throw err;
} Prevention
- Always add --yes to non-interactive mutation commands.
- Keep --dry-run for CI verification runs that should not change state.
- Review CI scripts after switching them from dry-run to real runs.
When it happens
Trigger: Running setup non-interactively (CI, piped stdio, no TTY) with flags that would change something, e.g. `ecc setup --mode claude-plugin --scope project` without --yes.
Common situations: CI pipelines forgetting the --yes flag; scripts where an earlier --dry-run was switched to a real run; automation that pipes setup output and thus disables interactivity.
Understand the failure class
Background: "--flag is required" and "must specify" CLI errors: how missing-required-flag validation works and how to fix it — this error's family across 20 libraries.
Related errors
- Interactive setup requires a terminal. Pass --mode…
- Non-interactive and JSON mutations require --yes.
- Claude requires explicit --claude-scope and --claude-hooks…
- Interactive --json mutations require --yes.
- Kimi requires an explicit --profile choice in this mode.
AI-assisted analysis of affaan-m/ECC@8321021c54 (2026-09-16).
Data as JSON: /api/errors/fc44528b1f9a2ac1.
Report an issue: GitHub.
Appendix: source
Thrown at scripts/setup.js:448
}
if (interactiveDefaults) {
const confirmationAction = interactiveDefaults.multipleScopes
? 'Resume migration'
: (
interactiveDefaults.installed && interactiveDefaults.scope !== options.scope
? 'Migrate'
: 'Apply'
);
options = {
...options,
confirmationAction,
};
}
if (needsConfirmation) {
if (!interactive) {
throw new Error('Non-interactive setup requires --yes.');
}
if (!terminal) {
terminal = readline.createInterface({
input: process.stdin,
output: process.stdout,
});
}
if (!await confirm(options, terminal)) {
printResult({
action: 'cancelled',
hooks: options.hooks || 'standard',
pluginId: 'ecc@ecc',
scope: options.scope || 'detected',
}, options.json);
return;
}
}
View on GitHub (pinned to 8321021c54)