{"record":{"id":"ddbdeb4315690db5","repo":"jdx/mise","slug":"dynamic-message-from-crate-shims-unavailable-configured-tool","errorCode":null,"errorMessage":"(dynamic message from crate::shims::unavailable_configured_tool_message)","messagePattern":"\\(dynamic message from crate::shims::unavailable_configured_tool_message\\)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/cli/which.rs","lineNumber":80,"sourceCode":"            Some((p, tv)) => {\n                if self.version {\n                    miseprintln!(\"{}\", tv.version);\n                } else if self.plugin {\n                    miseprintln!(\"{p}\");\n                } else {\n                    let path = p.which(&config, &tv, &bin_name).await?;\n                    miseprintln!(\"{}\", path.unwrap().display());\n                }\n                Ok(())\n            }\n            None => {\n                if let Some(msg) = self.uninstalled_tool_message(&config, &ts) {\n                    bail!(msg);\n                }\n                if let Some(msg) =\n                    crate::shims::unavailable_configured_tool_message(&config, &ts, &bin_name)\n                {\n                    bail!(msg);\n                }\n                if self.has_shim(&bin_name) {\n                    bail!(\n                        \"{bin_name} is a mise bin however it is not currently active. Use `mise use` to activate it in this directory.\"\n                    )\n                } else {\n                    bail!(\"{bin_name} is not a mise bin. Perhaps you need to install it first.\",)\n                }\n            }\n        }\n    }\n    async fn complete(&self, config: &Arc<Config>) -> Result<()> {\n        let ts = self.get_toolset(config).await?;\n        let bins = ts\n            .list_paths(config)\n            .await\n            .into_iter()\n            .flat_map(|p| file::ls(&p).unwrap_or_default())","sourceCodeStart":62,"sourceCodeEnd":98,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/cli/which.rs#L62-L98","documentation":"A fallback diagnostic in `mise which <bin>`: after the uninstalled-tool and shim checks, mise calls `crate::shims::unavailable_configured_tool_message` which produces a dynamic message explaining that the binary is configured (present in some config file) but not currently available/active in this toolset. It fires only when that helper returns a message.","triggerScenarios":"`mise which <bin>` where the bin is declared in a config file but its toolset entry cannot produce an executable path, and the earlier uninstalled_tool_message check did not apply — e.g. the tool is configured in a directory/env not active here.","commonSituations":"Config files from parent directories defining tools that failed to activate; tools configured for a different environment (MISE_ENV); partially failed installs leaving metadata but no binary.","solutions":["Read the dynamic message for the specific tool and run the suggested `mise install`/activation command.","Run `mise ls` to see which configured tools are inactive and why.","Reinstall or re-resolve the tool: `mise install` then `mise which <bin>` again."],"exampleFix":"// diagnose\nmise ls\nmise install\n// retry\nmise which <bin>","handlingStrategy":"try-catch","validationCode":"mise ls --json | jq -e --arg b \"$bin\" '.[] | select(.installed == null and .active == true)'","typeGuard":null,"tryCatchPattern":"if ! mise which \"$bin\" 2>/dev/null; then\n  mise install && mise which \"$bin\" || echo \"$bin not available in this toolset\"\nfi","preventionTips":["Install every tool referenced by active configs in CI setup","Check MISE_ENV-specific configs when switching environments","Treat partial install failures as fatal instead of continuing"],"tags":["cli","which","shim"],"backgroundTag":"command-not-found","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"}