BoundaryML/baml · error
{} --install-extension {} exited with {status}
Error message
{} --install-extension {} exited with {status} What it means
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.
Source
Thrown at baml_language/crates/baml_cli/src/ide_command.rs:93
fs::copy(&vsix, &dest).with_context(|| {
format!("failed to copy {} to {}", vsix.display(), dest.display())
})?;
#[allow(clippy::print_stdout)]
{
println!("extracted BAML IDE extension to {}", dest.display());
}
return Ok(ExitCode::Success);
}
let editor = self.resolve_editor()?;
let status = Command::new(&editor)
.arg("--install-extension")
.arg(&vsix)
.status()
.with_context(|| format!("failed to run {}", editor.to_string_lossy()))?;
if !status.success() {
anyhow::bail!(
"{} --install-extension {} exited with {status}",
editor.to_string_lossy(),
vsix.display()
);
}
#[allow(clippy::print_stdout)]
{
println!("installed BAML IDE extension from {}", vsix.display());
}
Ok(ExitCode::Success)
}
fn resolve_editor(&self) -> Result<OsString> {
if self.cursor {
return command_on_path("cursor")
.ok_or_else(|| missing_ide_cli_error("Cursor", "cursor", HostOs::CURRENT));
}View on GitHub (pinned to bd85ce9dee)
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
Defensive patterns
Strategy: try-catch
Validate before calling
// pre-check the vsix and editor version
assert!(Path::new(vsix_path).exists(), "vsix missing");
std::process::Command::new(editor).arg("--version").status()?; Try / catch
match result {
Err(e) if e.to_string().contains("--install-extension") => {
eprintln!("Auto-install failed; install the vsix manually via the editor's Extensions UI.");
}
other => other?,
} Prevention
- 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
When it happens
Trigger: 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.
Common situations: Stale/corrupt vsix in the toolchain assets, extension built for a newer editor API version, or managed-machine policies blocking extension installs.
Related errors
- failed to install the BAML extension automatically: no suppo
- baml ide install needs a managed BAML toolchain, but the act
- {selector} is a local path; there is nothing to install. Run
- {err}
- failed to install {} into {}
AI-assisted analysis of BoundaryML/baml@bd85ce9dee (2026-09-12).
Data as JSON: /api/errors/99ca34d17dee1842.
Report an issue: GitHub.