{"record":{"id":"8d14f31d1ac3d838","repo":"jdx/mise","slug":"invalid-system-package-spec-spec-expected-m-8d14f3","errorCode":null,"errorMessage":"invalid system package spec '{spec}': expected '<manager>:<package>[@version]'","messagePattern":"invalid system package spec '(.+?)': expected '<manager>:<package>\\[@version\\]'","errorType":"validation","errorClass":"eyre::Report","httpStatus":null,"severity":"error","filePath":"src/system/mod.rs","lineNumber":451,"sourceCode":"                name: rest.to_string(),\n                version: None,\n                tap_url: None,\n                desired: packages::PackageDesiredState::Present,\n            },\n        ));\n    }\n    match rest.rsplit_once('@') {\n        Some((name, version)) if !name.is_empty() && !version.is_empty() => Ok((\n            mgr,\n            PackageRequest {\n                name: name.to_string(),\n                version: (version != \"latest\").then(|| version.to_string()),\n                tap_url: None,\n                desired: packages::PackageDesiredState::Present,\n            },\n        )),\n        Some(_) => {\n            bail!(\"invalid system package spec '{spec}': expected '<manager>:<package>[@version]'\")\n        }\n        None => Ok((\n            mgr,\n            PackageRequest {\n                name: rest.to_string(),\n                version: None,\n                tap_url: None,\n                desired: packages::PackageDesiredState::Present,\n            },\n        )),\n    }\n}\n\n/// Build [`ManagerPackages`] from already-parsed requests (used by\n/// `mise bootstrap packages use`, where version pins come from the CLI spec). Unknown or\n/// settings-excluded managers are hard errors.\npub(crate) fn packages_from_requests(\n    by_mgr: IndexMap<String, Vec<PackageRequest>>,","sourceCodeStart":433,"sourceCodeEnd":469,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/system/mod.rs#L433-L469","documentation":"When parsing a 'mise bootstrap packages use' spec of the form manager:package[@version], the parser splits on ':' and then on '@'. If more than one colon is present (split_once yields Some((_, remaining)) where remaining still contains ':'), the spec is structurally invalid and mise bails.","triggerScenarios":"Passing a spec like 'apt:curl:latest' or 'apt:httpie:extra' — i.e. a second colon after the manager — to parse_use_spec; the Some(_) arm of the split match fires.","commonSituations":"Reusing the full 'apt:curl' style spec where only manager-relative 'curl@1.0' is accepted after the first colon; concatenating manager+package+version with colons instead of '@'.","solutions":["Use '@' for the version instead of a colon: apt:curl@8.5 instead of apt:curl:8.5","Include only one colon separating manager from package","Rewrite the spec in your bootstrap packages use config"],"exampleFix":"// before\nmise bootstrap packages use apt:curl:8.5\n// after\nmise bootstrap packages use apt:curl@8.5","handlingStrategy":"validation","validationCode":"const valid = /^[^:]+:[^:@]+(@[^:]+)?$/.test(spec); // \"mgr:pkg\" or \"mgr:pkg@ver\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use '@' for versions, never a second colon","Regex-validate use specs before passing them to mise","Remember the format is manager:package[@version]","Only one colon allowed per spec"],"tags":["cli","parsing","system-packages"],"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"}