{"record":{"id":"62f4547ebda93894","repo":"jdx/mise","slug":"brew-import-is-not-supported-on-windows","errorCode":null,"errorMessage":"brew import is not supported on windows","messagePattern":"brew import is not supported on windows","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/cli/system/import.rs","lineNumber":191,"sourceCode":"            cf.update_bootstrap_package_with_fallback(\n                &key,\n                \"latest\",\n                configured_packages.get(&key),\n            )?;\n        }\n        cf.save()?;\n        info!(\n            \"{}: imported {} brew formulae\",\n            display_path(&path),\n            formulae.len()\n        );\n        Ok(())\n    }\n\n    #[cfg(not(unix))]\n    async fn run_brew(self) -> Result<()> {\n        let _ = self.manager;\n        bail!(\"brew import is not supported on windows\")\n    }\n}\n\n#[cfg(unix)]\nfn imported_package_value(\n    target: Option<&PackageTomlConfig>,\n    configured: Option<&PackageTomlConfig>,\n) -> Value {\n    let options = match target {\n        Some(PackageTomlConfig::Options(options)) => Some(options),\n        Some(PackageTomlConfig::Version(_)) => None,\n        None => match configured {\n            Some(PackageTomlConfig::Options(options))\n                if !options.os.is_empty() || !options.env.is_empty() || options.adopt.is_some() =>\n            {\n                Some(options)\n            }\n            _ => None,","sourceCodeStart":173,"sourceCodeEnd":209,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/cli/system/import.rs#L173-L209","documentation":"`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.","triggerScenarios":"Running `mise bootstrap packages import` (any manager choice — `brew` is the only and default choice) on a Windows build of mise.","commonSituations":"A developer following Unix-oriented docs runs the import command on Windows (native or in PowerShell/cmd) and hits the platform stub.","solutions":["Run the import on a macOS/Linux machine where Homebrew is supported and copy the resulting `[bootstrap.packages]` config.","On Windows, manage packages with a Windows-appropriate manager (winget, choco, scoop) rather than `bootstrap packages import`.","Use WSL with Homebrew for Linux if you need brew semantics inside Windows."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"import platform\nif platform.system() == \"Windows\":\n    raise SystemExit(\"bootstrap packages import is unix-only; run on macOS/Linux/WSL\")","typeGuard":"const isUnix = process.platform !== \"win32\";\nif (!isUnix) skipBrewImport();","tryCatchPattern":null,"preventionTips":["Gate brew import steps on OS in scripts/CI.","Run Homebrew-dependent flows inside WSL on Windows machines.","Document platform support for bootstrap packages in team runbooks."],"tags":["windows","platform","brew","cli"],"backgroundTag":"unsupported-platform","analyzedSha":"533346cc374382b41ec5ff70536252b2e96e725c","analyzedAt":"2026-09-17T13:35:38.149Z","contentChangedAt":"2026-09-17T13:35:38.149Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}