{"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/533346cc374382b41ec5ff70536252b2e96e725c/src/cli/deps/install.rs#L51-L87","documentation":"`mise deps install --explain` prints a detailed explanation of a dependency provider, which requires knowing which provider to explain. Passing `--explain` without a provider positional (and without `--provider`) is ambiguous, so `run` bails with a usage example.","triggerScenarios":"Run `mise deps install --explain` (or `mise deps install --explain --only <x>` without provider) where `self.explain` is true and `self.provider.is_none()`.","commonSituations":"Users exploring `mise deps install --help` and combining `--explain` with only `--only` or `--list`-style flows; forgetting the provider positional `mise deps install npm --explain`.","solutions":["Pass the provider as a positional: `mise deps install npm --explain`.","Run `mise deps install --list` to see available provider ids first.","Use `--provider <id>` explicitly if your argument layout puts it after other flags."],"exampleFix":"// before\n$ mise deps install --explain\n// after\n$ mise deps install npm --explain","handlingStrategy":"validation","validationCode":"# shellcheck\n[[ $# -ge 1 ]] || { echo \"usage: mise deps install <provider> --explain\"; exit 2; }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always pass the provider positional with --explain.","Run `mise deps install --list` to discover provider ids first."],"tags":["cli","deps","explain","missing-argument"],"backgroundTag":"missing-required-argument","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"}