jdx/mise · error

brew import is not supported on windows

Error message

brew import is not supported on windows

What it means

`mise bootstrap packages import` only supports Homebrew, and Homebrew import is compiled/implemented only for Unix platforms. On Windows the `run_brew` stub is a hard stop that always fails, because mise does not support importing Homebrew formulae there.

Solutions

  1. Run the import on a macOS/Linux machine where Homebrew is supported and copy the resulting `[bootstrap.packages]` config.
  2. On Windows, manage packages with a Windows-appropriate manager (winget, choco, scoop) rather than `bootstrap packages import`.
  3. Use WSL with Homebrew for Linux if you need brew semantics inside Windows.
Defensive patterns

Strategy: validation

Validate before calling

import platform
if platform.system() == "Windows":
    raise SystemExit("bootstrap packages import is unix-only; run on macOS/Linux/WSL")

Type guard

const isUnix = process.platform !== "win32";
if (!isUnix) skipBrewImport();

Prevention

When it happens

Trigger: Running `mise bootstrap packages import` (any manager choice — `brew` is the only and default choice) on a Windows build of mise.

Common situations: A developer following Unix-oriented docs runs the import command on Windows (native or in PowerShell/cmd) and hits the platform stub.

Understand the failure class

Background: "unsupported platform" / "not supported on this platform" errors: what they mean and how to fix them — this error's family across 47 libraries.

Related errors


AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17). Data as JSON: /api/errors/62f4547ebda93894. Report an issue: GitHub.

Appendix: source

Thrown at src/cli/system/import.rs:191

            cf.update_bootstrap_package_with_fallback(
                &key,
                "latest",
                configured_packages.get(&key),
            )?;
        }
        cf.save()?;
        info!(
            "{}: imported {} brew formulae",
            display_path(&path),
            formulae.len()
        );
        Ok(())
    }

    #[cfg(not(unix))]
    async fn run_brew(self) -> Result<()> {
        let _ = self.manager;
        bail!("brew import is not supported on windows")
    }
}

#[cfg(unix)]
fn imported_package_value(
    target: Option<&PackageTomlConfig>,
    configured: Option<&PackageTomlConfig>,
) -> Value {
    let options = match target {
        Some(PackageTomlConfig::Options(options)) => Some(options),
        Some(PackageTomlConfig::Version(_)) => None,
        None => match configured {
            Some(PackageTomlConfig::Options(options))
                if !options.os.is_empty() || !options.env.is_empty() || options.adopt.is_some() =>
            {
                Some(options)
            }
            _ => None,

View on GitHub (pinned to 533346cc37)