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

  1. Inspect the exit status in the message and run the shown command manually for stderr details
  2. Verify the vsix exists and is intact at the printed path
  3. Update the editor to a version compatible with the extension
  4. 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

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


AI-assisted analysis of BoundaryML/baml@bd85ce9dee (2026-09-12). Data as JSON: /api/errors/99ca34d17dee1842. Report an issue: GitHub.