{"record":{"id":"76ab776caed3f9b0","repo":"Yeachan-Heo/oh-my-codex","slug":"unknown-omx-update-option-arg-expected-no-fla","errorCode":null,"errorMessage":"Unknown omx update option: ${arg}. Expected no flags, --stable, or --dev.","messagePattern":"Unknown omx update option: (.+?)\\. Expected no flags, --stable, or --dev\\.","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/cli/index.ts","lineNumber":799,"sourceCode":"}\n\nexport function resolveUpdateChannelArg(args: string[]): UpdateChannel {\n  let channel: UpdateChannel = 'stable';\n  let sawStable = false;\n  let sawDev = false;\n\n  for (const arg of args) {\n    if (arg === '--stable') {\n      sawStable = true;\n      channel = 'stable';\n      continue;\n    }\n    if (arg === '--dev') {\n      sawDev = true;\n      channel = 'dev';\n      continue;\n    }\n    throw new Error(\n      `Unknown omx update option: ${arg}. Expected no flags, --stable, or --dev.`,\n    );\n  }\n\n  if (sawStable && sawDev) {\n    throw new Error('omx update --dev and --stable are mutually exclusive.');\n  }\n\n  return channel;\n}\n\nexport function resolveNotifyTempContract(\n  args: string[],\n  env: NodeJS.ProcessEnv = process.env,\n): ParseNotifyTempContractResult {\n  return parseNotifyTempContractFromArgs(args, env);\n}\n","sourceCodeStart":781,"sourceCodeEnd":817,"githubUrl":"https://github.com/Yeachan-Heo/oh-my-codex/blob/3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2/src/cli/index.ts#L781-L817","documentation":"The `omx update` command accepts only no flags, --stable, or --dev. Any other token starting with `-` is rejected as unknown.","triggerScenarios":"`omx update --channel dev`, `omx update --force`, or any unrecognized flag.","commonSituations":"Habitual flags from other package managers (npm/yarn style) applied to the updater; outdated docs.","solutions":["Remove the unsupported flag","Use --stable or --dev to pick a channel, or nothing for default"],"exampleFix":"# before\nomx update --channel beta\n# after\nomx update --dev","handlingStrategy":"validation","validationCode":"const allowed = new Set(['--stable', '--dev']);\nfor (const a of args) if (a.startsWith('-') && !allowed.has(a)) throw new Error(`unknown update option: ${a}`);","typeGuard":null,"tryCatchPattern":"catch (e) { if (/Unknown omx update option/.test(e.message)) /* print usage and exit 2 */ }","preventionTips":["omx update takes only --stable or --dev"],"tags":["cli","unknown-flag","update","channel"],"backgroundTag":"unknown-cli-flag","analyzedSha":"3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2","analyzedAt":"2026-08-27T22:18:39.783Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}