jdx/mise · error
brew prune is not supported on windows
Error message
brew prune is not supported on windows
What it means
The brew prune path in mise is compiled only for unix targets. On non-unix builds (Windows), `run_brew` is a stub that unconditionally bails, because Homebrew does not exist on Windows and there is no formula-prune implementation to fall back to.
Solutions
- Run `mise system prune brew` on macOS or Linux instead of Windows
- Skip the brew prune step in Windows CI/scripts (guard on OS)
- If you need Windows package cleanup, use a Windows-native manager (e.g. scoop/winget flows) rather than the brew manager
Example fix
// before (windows runner) - run: mise system prune brew // after - run: mise system prune brew if: runner.os != 'Windows'
Defensive patterns
Strategy: fallback
Validate before calling
[[ "$(uname -s)" != MINGW* && "$(uname -s)" != CYGWIN* ]] && mise system prune brew
Try / catch
mise system prune brew 2>/dev/null || echo 'brew prune unsupported on this platform'
Prevention
- Guard brew commands with an OS check in cross-platform scripts
- Skip Homebrew steps on Windows CI runners
- Document platform requirements in team scripts
When it happens
Trigger: Invoking `mise system prune brew` (run_inner dispatching by manager name) on a Windows build of mise — the `#[cfg(not(unix))]` stub always returns this error regardless of arguments.
Common situations: Windows users attempting Homebrew-style package pruning, e.g. after copying unix documentation or scripts; CI matrix accidentally running the brew prune step on a windows runner.
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
- brew-cask prune is not supported on windows
- app target is outside an allowed Applications directory
- artifact target has changed
- binary target is not an owned Caskroom symlink
- brew-cask is not available
AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17).
Data as JSON: /api/errors/c33fa2abb504009d.
Report an issue: GitHub.
Appendix: source
Thrown at src/cli/system/prune.rs:224
.iter()
.map(|candidate| format!("{}@{}", candidate.token, candidate.version))
.collect::<Vec<_>>();
if !self.yes && !Settings::get().yes && console::user_attended_stderr() {
let msg = format!("brew-cask: prune {}?", remove.join(", "));
if !prompt::confirm(msg)?.is_yes() {
info!("brew-cask: skipped");
return Ok(());
}
}
let removed = brew::apply_cask_prune_plan(&plan, false)?;
info!("brew-cask: pruned {removed} casks");
Ok(())
}
#[cfg(not(unix))]
async fn run_brew(self) -> Result<()> {
let _ = self.manager;
bail!("brew prune is not supported on windows")
}
#[cfg(not(unix))]
async fn run_brew_cask(self) -> Result<()> {
let _ = self.manager;
bail!("brew-cask prune is not supported on windows")
}
}
View on GitHub (pinned to 533346cc37)