{"record":{"id":"442dfc8b5e49ca4a","repo":"affaan-m/ECC","slug":"unknown-argument-run-guided-install-with-help-t","errorCode":null,"errorMessage":"Unknown argument. Run guided install with --help to see valid options.","messagePattern":"Unknown argument\\. Run guided install with --help to see valid options\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"scripts/install-guided.js","lineNumber":102,"sourceCode":"        throw new Error(`Value for ${argument} is too long.`);\n      }\n      const key = valueFlags.get(argument);\n      options = key === 'harnesses'\n        ? { ...options, harnesses: [...options.harnesses, value] }\n        : { ...options, [key]: value };\n      index += 1;\n    } else if (argument === '--all-harnesses') {\n      options = { ...options, allHarnesses: true };\n    } else if (argument === '--yes' || argument === '-y') {\n      options = { ...options, yes: true };\n    } else if (argument === '--dry-run') {\n      options = { ...options, dryRun: true };\n    } else if (argument === '--json') {\n      options = { ...options, json: true };\n    } else if (argument === '--help' || argument === '-h') {\n      options = { ...options, help: true };\n    } else {\n      throw new Error('Unknown argument. Run guided install with --help to see valid options.');\n    }\n  }\n  if (options.allHarnesses && options.harnesses.length > 0) {\n    throw new Error('--all-harnesses and --harness are mutually exclusive.');\n  }\n  return options;\n}\n\nfunction choicesText(values) {\n  return values.join('|');\n}\n\nasync function askChoice(terminal, output, prompt, values, defaultValue) {\n  output.write(`\\n${prompt}\\n`);\n  values.forEach((value, index) => output.write(`  ${index + 1}. ${value}\\n`));\n  while (true) {\n    const question = defaultValue\n      ? `Choose [Recommended: ${defaultValue}] (one option only): `","sourceCodeStart":84,"sourceCodeEnd":120,"githubUrl":"https://github.com/affaan-m/ECC/blob/01e15490f04e29cfefe3896951f43db46994d8ee/scripts/install-guided.js#L84-L120","documentation":"install-guided.js rejects any token that is not one of its known flags (--harness, --claude-scope, --claude-hooks, --profile, --all-harnesses, --yes/-y, --dry-run, --json, --help/-h). The error directs the user to --help rather than guessing intent.","triggerScenarios":"Passing --force, --target, --verbose, a typo like --harnes, or a flag that belongs to a different ECC command (e.g. --modules which is install-plan's flag).","commonSituations":"Mixing flags between install-guided and install-plan, using an outdated flag name, or a wrapper script passing the wrong option set.","solutions":["Run node scripts/install-guided.js --help to list valid options","Remove the unsupported flag","If you need --modules/--with/--target, use scripts/install-plan.js instead"],"exampleFix":"// before\nnode scripts/install-guided.js --modules core\n// after\nnode scripts/install-guided.js --profile core","handlingStrategy":"validation","validationCode":"const KNOWN = new Set(['--harness','--claude-scope','--claude-hooks','--profile','--all-harnesses','--yes','-y','--dry-run','--json','--help','-h']);\nfor (const a of argv) {\n  if (a.startsWith('-') && !KNOWN.has(a)) throw new Error(`Unknown install-guided argument: ${a}`);\n}","typeGuard":"function isKnownInstallGuidedArg(arg) {\n  return ['--harness','--claude-scope','--claude-hooks','--profile','--all-harnesses','--yes','-y','--dry-run','--json','--help','-h'].includes(arg);\n}","tryCatchPattern":"try { parseInstallGuidedArgs(argv); }\ncatch (err) {\n  if (/^Unknown argument/.test(err.message)) {\n    console.error(`${err.message}\\nRun: node scripts/install-guided.js --help`);\n    process.exit(2);\n  }\n  throw err;\n}","preventionTips":["Run --help and keep its output beside your wrapper script","Remember install-guided and install-plan have different flag sets","Assert the help output in CI to catch flag drift on upgrade"],"tags":["cli","argument-parsing","install-guided"],"backgroundTag":null,"analyzedSha":"01e15490f04e29cfefe3896951f43db46994d8ee","analyzedAt":"2026-08-13T00:31:08.655Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}