{"record":{"id":"64e8e63f38761b80","repo":"Yeachan-Heo/oh-my-codex","slug":"unknown-adapt-target-target-supported-targets","errorCode":null,"errorMessage":"Unknown adapt target: ${target}. Supported targets: ${supportedAdaptTargets().join(\", \")}","messagePattern":"Unknown adapt target: (.+?)\\. Supported targets: (.+?)","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/cli/adapt.ts","lineNumber":135,"sourceCode":"}\n\nexport async function adaptCommand(\n\targs: string[],\n\tdeps: AdaptCommandDependencies = {},\n): Promise<void> {\n\tconst cwd = deps.cwd ?? process.cwd();\n\tconst stdout = deps.stdout ?? ((line: string) => console.log(line));\n\tconst { target, subcommand, json, write, wantsHelp } = parseArgs(args);\n\n\tif (!target || wantsHelp) {\n\t\tif (!target) {\n\t\t\tstdout(HELP);\n\t\t\treturn;\n\t\t}\n\n\t\tconst descriptor = getAdaptTargetDescriptor(target);\n\t\tif (!descriptor) {\n\t\t\tthrow new Error(\n\t\t\t\t`Unknown adapt target: ${target}. Supported targets: ${supportedAdaptTargets().join(\", \")}`,\n\t\t\t);\n\t\t}\n\t\tstdout(targetHelp(descriptor.target));\n\t\treturn;\n\t}\n\n\tconst descriptor = getAdaptTargetDescriptor(target);\n\tif (!descriptor) {\n\t\tthrow new Error(\n\t\t\t`Unknown adapt target: ${target}. Supported targets: ${supportedAdaptTargets().join(\", \")}`,\n\t\t);\n\t}\n\n\tif (!subcommand) {\n\t\tstdout(targetHelp(descriptor.target));\n\t\treturn;\n\t}","sourceCodeStart":117,"sourceCodeEnd":153,"githubUrl":"https://github.com/Yeachan-Heo/oh-my-codex/blob/3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2/src/cli/adapt.ts#L117-L153","documentation":"Thrown when `omx adapt <target>` (help/listing mode) is called with a target that getAdaptTargetDescriptor does not recognize. The message lists all supported adapt targets so the user can self-correct. Only registered adapt targets (e.g. known CI/editor integrations) are accepted.","triggerScenarios":"Running `omx adapt <name>` where <name> is not in supportedAdaptTargets(), e.g. a typo like `omx adapt gihub`, or a target registered only in a newer/older version.","commonSituations":"Typos in target names, targets removed/renamed between versions, or custom targets that were never registered via the adapt target registry.","solutions":["Use one of the targets printed in the error message","Run `omx adapt` with no arguments to list targets","Upgrade omx if you expect a target that the current build does not know"],"exampleFix":"# before\nomx adapt gihub\n\n# after\nomx adapt github","handlingStrategy":"validation","validationCode":"import { supportedAdaptTargets } from './adapt';\nif (!supportedAdaptTargets().includes(target)) {\n  console.error(`unsupported target; choose from: ${supportedAdaptTargets().join(', ')}`);\n  process.exit(2);\n}","typeGuard":"const isAdaptTarget = (t: string): boolean => supportedAdaptTargets().includes(t);","tryCatchPattern":null,"preventionTips":["Pin scripts to documented target names","Re-validate targets after upgrading the CLI","Print supportedAdaptTargets() in setup scripts for discoverability"],"tags":["cli","adapt","unknown-target","usage"],"backgroundTag":"unknown-cli-target","analyzedSha":"3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2","analyzedAt":"2026-08-27T22:18:39.783Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}