{"record":{"id":"65d86da34df3cd30","repo":"jdx/mise","slug":"brew-cask-prune-is-not-supported-on-windows","errorCode":null,"errorMessage":"brew-cask prune is not supported on windows","messagePattern":"brew-cask prune is not supported on windows","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/cli/system/prune.rs","lineNumber":230,"sourceCode":"                info!(\"brew-cask: skipped\");\n                return Ok(());\n            }\n        }\n        let removed = brew::apply_cask_prune_plan(&plan, false)?;\n        info!(\"brew-cask: pruned {removed} casks\");\n        Ok(())\n    }\n\n    #[cfg(not(unix))]\n    async fn run_brew(self) -> Result<()> {\n        let _ = self.manager;\n        bail!(\"brew prune is not supported on windows\")\n    }\n\n    #[cfg(not(unix))]\n    async fn run_brew_cask(self) -> Result<()> {\n        let _ = self.manager;\n        bail!(\"brew-cask prune is not supported on windows\")\n    }\n}\n","sourceCodeStart":212,"sourceCodeEnd":233,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/cli/system/prune.rs#L212-L233","documentation":"`mise system prune --manager brew-cask` was executed on Windows. The brew-cask code paths are compiled only for Unix (cfg(not(unix)) stubs), so the Windows build deliberately bails to make the unsupported platform explicit instead of silently skipping.","triggerScenarios":"Invoking `mise system prune brew-cask` on a Windows build of mise — the `#[cfg(not(unix))]` stub always returns this error.","commonSituations":"Windows developers following macOS-oriented docs; windows-latest CI runners executing a prune script intended for macos runners.","solutions":["Run the brew-cask prune on macOS (the only platform where casks meaningfully exist)","Guard the command with an OS check in scripts/CI","Use a Windows-native package manager cleanup instead"],"exampleFix":"// before\nmise system prune brew-cask  # on Windows\n// after (script guard)\nif [[ \"$(uname -s)\" == Darwin* ]]; then mise system prune brew-cask; fi","handlingStrategy":"fallback","validationCode":"[[ \"$(uname -s)\" == Darwin* ]] && mise system prune brew-cask","typeGuard":null,"tryCatchPattern":"mise system prune brew-cask 2>/dev/null || echo 'cask prune requires macOS'","preventionTips":["Only run cask operations on macOS","Add runner.os guards in CI matrices","Prefer formula prune (`brew`) on Linux where relevant"],"tags":["windows","homebrew","cask","unsupported-platform"],"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"}