{"record":{"id":"697b34b31b9ced83","repo":"jdx/mise","slug":"invalid-tool-version-request-s","errorCode":null,"errorMessage":"invalid tool version request: {s}","messagePattern":"invalid tool version request: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/toolset/tool_request.rs","lineNumber":191,"sourceCode":"                if s == \"system\" {\n                    Self::System {\n                        options,\n                        backend,\n                        source,\n                        lockfile_scope: LockfileScope::Default,\n                    }\n                } else {\n                    validate_version_string(&s)?;\n                    Self::Version {\n                        version: s,\n                        options,\n                        backend,\n                        source,\n                        lockfile_scope: LockfileScope::Default,\n                    }\n                }\n            }\n            _ => bail!(\"invalid tool version request: {s}\"),\n        })\n    }\n\n    /// Construct an unvalidated version request for tests that exercise paths\n    /// derived from otherwise-invalid version strings.\n    #[cfg(test)]\n    pub(crate) fn new_version_for_test(\n        backend: Arc<BackendArg>,\n        version: &str,\n        source: ToolSource,\n    ) -> Self {\n        let options = backend.resolve_opts_with_config_and_request(None, None);\n        Self::Version {\n            backend,\n            version: version.to_string(),\n            options,\n            source,\n            lockfile_scope: LockfileScope::Default,","sourceCodeStart":173,"sourceCodeEnd":209,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/toolset/tool_request.rs#L173-L209","documentation":"`ToolRequest::new_with_options` parses a tool version string like `node@20` or `node:20`. If the string doesn't match any accepted grammar, it bails with this message echoing the input. It is the validation gate for all tool version requests built from user/config strings.","triggerScenarios":"Passing a malformed version string to toolset construction/config parsing — e.g. missing `@`, unsupported prefix (`ref:`, `sub-` misuse), stray whitespace, or an otherwise unparsable form like `node@` or `nod e@20`.","commonSituations":"Typo in a mise.toml `[tools]` entry or `.tool-versions` line; shell interpolation producing an empty version (`node@$VERSION` with unset VERSION); copy-pasted strings with quotes or spaces.","solutions":["Fix the version string to the expected `tool@version` form, e.g. `node@20.0.0` or `node@latest`.","Check for unexpanded shell variables or quoting issues in the config.","Verify the syntax supports your intent (prefixes, latest, ref:, etc.) per mise docs.","Run `mise ls-remote <tool>` to confirm valid version names before pinning."],"exampleFix":"// before\n[tools]\nnode = \"\"\n// after\n[tools]\nnode = \"20\"","handlingStrategy":"validation","validationCode":"fn valid_request(s: &str) -> bool { let s = s.trim(); s.contains('@') && !s.ends_with('@') && !s.split('@').next().unwrap().is_empty() }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Validate tool@version strings before writing them into config files.","Quote version strings in shell-generated configs to avoid empty interpolations.","Test config edits with a mise command that parses the toolset before committing."],"tags":["config","parsing","version","tool-request"],"backgroundTag":"invalid-argument-format","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"}