{"record":{"id":"99ca34d17dee1842","repo":"BoundaryML/baml","slug":"install-extension-exited-with-status","errorCode":null,"errorMessage":"{} --install-extension {} exited with {status}","messagePattern":"(.+?) --install-extension (.+?) exited with (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"baml_language/crates/baml_cli/src/ide_command.rs","lineNumber":93,"sourceCode":"            fs::copy(&vsix, &dest).with_context(|| {\n                format!(\"failed to copy {} to {}\", vsix.display(), dest.display())\n            })?;\n            #[allow(clippy::print_stdout)]\n            {\n                println!(\"extracted BAML IDE extension to {}\", dest.display());\n            }\n            return Ok(ExitCode::Success);\n        }\n\n        let editor = self.resolve_editor()?;\n        let status = Command::new(&editor)\n            .arg(\"--install-extension\")\n            .arg(&vsix)\n            .status()\n            .with_context(|| format!(\"failed to run {}\", editor.to_string_lossy()))?;\n\n        if !status.success() {\n            anyhow::bail!(\n                \"{} --install-extension {} exited with {status}\",\n                editor.to_string_lossy(),\n                vsix.display()\n            );\n        }\n\n        #[allow(clippy::print_stdout)]\n        {\n            println!(\"installed BAML IDE extension from {}\", vsix.display());\n        }\n        Ok(ExitCode::Success)\n    }\n\n    fn resolve_editor(&self) -> Result<OsString> {\n        if self.cursor {\n            return command_on_path(\"cursor\")\n                .ok_or_else(|| missing_ide_cli_error(\"Cursor\", \"cursor\", HostOs::CURRENT));\n        }","sourceCodeStart":75,"sourceCodeEnd":111,"githubUrl":"https://github.com/BoundaryML/baml/blob/bd85ce9dee1463ff04d27efd20531013a4ff46c1/baml_language/crates/baml_cli/src/ide_command.rs#L75-L111","documentation":"After launching the IDE's CLI (`code` or `cursor`) with `--install-extension <vsix>`, `IdeCommand::run` checks the exit status and bails if it was not successful. The message embeds the editor binary, the vsix path, and the raw exit status.","triggerScenarios":"Running `baml ide install` where the editor CLI exists but the extension installation fails: the VSIX file is corrupt or incompatible, the editor version rejects it, or the editor requires elevation.","commonSituations":"Stale/corrupt vsix in the toolchain assets, extension built for a newer editor API version, or managed-machine policies blocking extension installs.","solutions":["Inspect the exit status in the message and run the shown command manually for stderr details","Verify the vsix exists and is intact at the printed path","Update the editor to a version compatible with the extension","Install the extension manually via the editor's Extensions UI"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// pre-check the vsix and editor version\nassert!(Path::new(vsix_path).exists(), \"vsix missing\");\nstd::process::Command::new(editor).arg(\"--version\").status()?;","typeGuard":null,"tryCatchPattern":"match result {\n    Err(e) if e.to_string().contains(\"--install-extension\") => {\n        eprintln!(\"Auto-install failed; install the vsix manually via the editor's Extensions UI.\");\n    }\n    other => other?,\n}","preventionTips":["Run the --install-extension command manually once to see the editor's stderr","Keep the editor updated to match the extension's engine requirements","Verify toolchain assets are not truncated/corrupted after download"],"tags":["ide","vscode","install"],"backgroundTag":"process-exited-nonzero","analyzedSha":"bd85ce9dee1463ff04d27efd20531013a4ff46c1","analyzedAt":"2026-09-12T03:38:25.718Z","contentChangedAt":"2026-09-12T03:38:25.718Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}