{"record":{"id":"b296aa4422f67036","repo":"jdx/mise","slug":"is-not-available-reason","errorCode":null,"errorMessage":"{} is not available: {reason}","messagePattern":"(.+?) is not available: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/cli/system/prune.rs","lineNumber":82,"sourceCode":"            \"brew\" => self.run_brew().await,\n            \"brew-cask\" => self.run_brew_cask().await,\n            _ => self.run_plugin().await,\n        }\n    }\n\n    async fn run_plugin(self) -> Result<()> {\n        let discovered = system::packages::all_managers()\n            .into_iter()\n            .find(|manager| manager.name() == self.manager)\n            .ok_or_else(|| eyre::eyre!(\"unknown bootstrap package manager '{}'\", self.manager))?;\n        if !discovered.is_plugin() {\n            bail!(\n                \"package manager '{}' does not support pruning\",\n                self.manager\n            );\n        }\n        if let Some(reason) = discovered.unavailable_reason_async().await {\n            bail!(\"{} is not available: {reason}\", self.manager);\n        }\n        let manager = PackagePluginManager::new(self.manager.clone())?;\n        let config = Config::get().await?;\n        let configured = system::package_requests_for_manager_from_config_and_tracked_config_files(\n            &config,\n            &self.manager,\n        )\n        .await?;\n        let plan = manager.prune_plan(&configured).await?;\n        if plan.is_empty() {\n            if !self.dry_run {\n                manager.apply_prune_plan(&plan).await?;\n            }\n            info!(\"{}: nothing to prune\", self.manager);\n            return Ok(());\n        }\n        if !manager.supports_uninstall() {\n            bail!(","sourceCodeStart":64,"sourceCodeEnd":100,"githubUrl":"https://github.com/jdx/mise/blob/afd2eddd3a50c16190efc1c7e94404b48f72af57/src/cli/system/prune.rs#L64-L100","documentation":"In prune's run_plugin, after confirming the manager is a plugin, mise calls `unavailable_reason_async()`; if the plugin reports any unavailability (missing hooks, broken plugin runtime, missing manager binary), the prune aborts with `<manager> is not available: <reason>`. Prune requires a fully functional plugin because it must enumerate and remove installed packages.","triggerScenarios":"Running `mise system prune --manager <plugin>` where the plugin's manager binary is missing, its Lua hooks fail to load, or `unavailable_reason_async()` returns a reason for any environmental cause.","commonSituations":"Plugin installed but the underlying package manager (e.g. cargo binary) absent from PATH; vfox plugin missing required hook files; broken plugin after an upgrade.","solutions":["Fix the underlying issue in the reason (install the manager binary, repair plugin hooks).","Reinstall/update the plugin.","Run `mise system packages` with the same manager first to confirm availability before pruning."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"# Ensure the plugin and its underlying manager binary work first\nmise system packages --manager myplugin --dry-run","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Install the plugin's underlying package-manager binary and keep it on PATH.","Reinstall plugins after failures (mise plugin update).","Dry-run the manager before pruning."],"tags":["cli","system-packages","prune","plugin","unavailable"],"backgroundTag":"missing-dependency","analyzedSha":"afd2eddd3a50c16190efc1c7e94404b48f72af57","analyzedAt":"2026-09-09T01:38:25.179Z","contentChangedAt":"2026-09-09T01:38:25.179Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}