{"record":{"id":"ca8b54de9d506403","repo":"jdx/mise","slug":"explain-requires-a-provider-argument-e-g-mise","errorCode":null,"errorMessage":"--explain requires a provider argument, e.g.: mise deps install npm --explain","messagePattern":"--explain requires a provider argument, e\\.g\\.: mise deps install npm --explain","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/cli/deps/install.rs","lineNumber":69,"sourceCode":"    pub(super) async fn run(self) -> Result<()> {\n        let config = Config::get().await?;\n        let monorepo_union = if self.monorepo {\n            Some(config.monorepo_union().await?)\n        } else {\n            None\n        };\n        let engine = match &monorepo_union {\n            Some(union) => DepsEngine::new_monorepo(&config, union.config_files.values().cloned())?,\n            None => DepsEngine::new(&config)?,\n        };\n\n        if self.list {\n            self.list_providers(&engine)?;\n            return Ok(());\n        }\n\n        if self.explain && self.provider.is_none() {\n            bail!(\"--explain requires a provider argument, e.g.: mise deps install npm --explain\");\n        }\n\n        // If a provider is specified as a positional arg, treat it like --only.\n        let only = match (&self.provider, &self.only) {\n            (Some(p), None) => Some(vec![p.clone()]),\n            (Some(p), Some(list)) => {\n                let mut combined = list.clone();\n                if !combined.contains(p) {\n                    combined.push(p.clone());\n                }\n                Some(combined)\n            }\n            (None, only) => only.clone(),\n        };\n        let skip = self.skip.unwrap_or_default();\n\n        // Report an explicitly selected inactive provider before resolving or\n        // installing unrelated tools from the project toolset.","sourceCodeStart":51,"sourceCodeEnd":87,"githubUrl":"https://github.com/jdx/mise/blob/afd2eddd3a50c16190efc1c7e94404b48f72af57/src/cli/deps/install.rs#L51-L87","documentation":"`mise deps install --explain` prints a detailed explanation for one specific provider. Because the explanation is provider-specific, the flag requires a provider positional argument; when `--explain` is passed with no provider, run() bails with this usage error before doing any work.","triggerScenarios":"Running `mise deps install --explain` (or `mise deps install --list --explain`-style invocations) without naming a provider, e.g. omitting `npm` from `mise deps install npm --explain`.","commonSituations":"Users who saw `--list` works standalone and assume `--explain` also lists/explains all providers, or shell aliases that drop the positional argument.","solutions":["Provide the provider name: `mise deps install <provider> --explain`","Run `mise deps install --list` first to see available provider ids, then pass one to --explain","Use --only with a provider list if you want to restrict installation instead of explaining"],"exampleFix":"// before\nmise deps install --explain\n// after\nmise deps install npm --explain","handlingStrategy":"validation","validationCode":"if [[ \" $* \" == *' --explain '* ]] && [[ $# -eq 1 ]]; then echo '--explain needs a provider arg'; fi","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always pair --explain with a provider id in scripts","Run `mise deps install --list` to obtain valid provider ids first","Do not assume --explain defaults to listing; that is --list's job"],"tags":["cli","deps","usage"],"backgroundTag":"missing-required-flag","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"}