{"record":{"id":"e081cfb446f6ee6a","repo":"nikivdev/code","slug":"has-no-exec-run-argv-in","errorCode":null,"errorMessage":"{} has no exec.run argv in {}","messagePattern":"(.+?) has no exec\\.run argv in (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/external_cli.rs","lineNumber":204,"sourceCode":"    let status = command.status().with_context(|| {\n        format!(\n            \"failed to launch external CLI {} from {}\",\n            id,\n            tool.manifest_path.display()\n        )\n    })?;\n\n    ensure_success(id, status)\n}\n\nimpl ResolvedExternalCliTool {\n    pub fn command<I, S>(&self, args: I) -> Result<Command>\n    where\n        I: IntoIterator<Item = S>,\n        S: AsRef<str>,\n    {\n        if self.manifest.exec.run.is_empty() {\n            bail!(\n                \"{} has no exec.run argv in {}\",\n                self.manifest.id,\n                self.manifest_path.display()\n            );\n        }\n\n        let mut argv = self.manifest.exec.run.iter();\n        let Some(program) = argv.next() else {\n            bail!(\n                \"{} has no exec.run program in {}\",\n                self.manifest.id,\n                self.manifest_path.display()\n            );\n        };\n\n        let mut command = Command::new(program);\n        command.current_dir(&self.source_root);\n        command.args(argv);","sourceCodeStart":186,"sourceCodeEnd":222,"githubUrl":"https://github.com/nikivdev/code/blob/a747e741ae92c09071d0ae946ab48488adcff1ce/src/external_cli.rs#L186-L222","documentation":"Thrown by `Commander::command` when the referenced manifest declares an empty `exec.run` argv list, so there is no external command to spawn. The library requires every external CLI manifest to specify at least one argv entry before it can invoke the tool. It names both the manifest id and the manifest file path to make the offending file easy to locate.","triggerScenarios":"Calling `commander.command([...])` where `self.manifest.exec.run` is an empty vector — e.g. a manifest TOML that omits the `[exec] run = [...]` entry or sets `run = []`.","commonSituations":"Hand-written manifest missing the `exec.run` key entirely; manifest generated by a template with a placeholder left empty; manifest edited to comment out the run argv while keeping the tool registered.","solutions":["Add a non-empty `exec.run` argv array to the manifest (program first, then arguments), e.g. `run = [\"my-tool\"]`.","Verify you are pointing at the intended manifest file (the path is shown in the message) — you may be reading a stub or partial manifest.","Re-install or re-link the tool if its manifest was corrupted, so a valid manifest is written."],"exampleFix":"# before (tool.toml)\n[exec]\nrun = []\n\n# after\n[exec]\nrun = [\"my-cli\", \"--verbose\"]","handlingStrategy":"validation","validationCode":"fn validate_exec_run(manifest: &ExternalCliManifest) -> Result<(), String> {\n    if manifest.exec.run.is_empty() {\n        return Err(format!(\"manifest {} has empty exec.run\", manifest.id));\n    }\n    Ok(())\n}","typeGuard":"fn has_exec_run(manifest: &ExternalCliManifest) -> bool {\n    !manifest.exec.run.is_empty()\n}","tryCatchPattern":"match cmd.commander.command(&args) {\n    Ok(cmd) => cmd,\n    Err(e) if e.to_string().contains(\"no exec.run argv\") => {\n        eprintln!(\"manifest missing exec.run: {e}\");\n        return Err(e);\n    }\n    Err(e) => return Err(e),\n}","preventionTips":["Always define a non-empty `exec.run` argv in every manifest.","Validate manifests with a linter/schema check before registering them.","Use manifest templates that require the `run` field.","Test each manifest by resolving and dry-running the tool in CI."],"tags":["manifest","configuration","external-cli"],"backgroundTag":"missing-manifest-field","analyzedSha":"a747e741ae92c09071d0ae946ab48488adcff1ce","analyzedAt":"2026-09-01T22:43:55.719Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}