{"record":{"id":"f3a9a18a76b8d702","repo":"jdx/mise","slug":"title-requires-exactly-1-argument","errorCode":null,"errorMessage":"title requires exactly 1 argument","messagePattern":"title requires exactly 1 argument","errorType":"validation","errorClass":"eyre::Report","httpStatus":null,"severity":"error","filePath":"crates/aqua-registry/src/template.rs","lineNumber":351,"sourceCode":"        if args.len() != 1 {\n            bail!(\"semver requires exactly 1 argument\");\n        }\n        let input = args[0].as_string();\n        let clean_version = input.strip_prefix('v').unwrap_or(&input);\n        let version = Versioning::new(clean_version)\n            .wrap_err_with(|| format!(\"invalid semver version: {input}\"))?;\n\n        Ok(Box::new(SemVerValue {\n            major: version.nth(0).unwrap_or(0),\n            minor: version.nth(1).unwrap_or(0),\n            patch: version.nth(2).unwrap_or(0),\n            original: clean_version.to_string(),\n        }) as Box<dyn Value>)\n    });\n\n    registry.insert(\"title\", |args| {\n        if args.len() != 1 {\n            bail!(\"title requires exactly 1 argument\");\n        }\n        Ok(Box::new(StringValue(args[0].as_string().to_title_case())) as Box<dyn Value>)\n    });\n\n    registry.insert(\"trimV\", |args| {\n        if args.len() != 1 {\n            bail!(\"trimV requires exactly 1 argument\");\n        }\n        Ok(Box::new(StringValue(\n            args[0].as_string().trim_start_matches('v').to_string(),\n        )) as Box<dyn Value>)\n    });\n\n    registry.insert(\"trimPrefix\", |args| {\n        if args.len() != 2 {\n            bail!(\"trimPrefix requires exactly 2 arguments\");\n        }\n        let prefix = args[0].as_string();","sourceCodeStart":333,"sourceCodeEnd":369,"githubUrl":"https://github.com/jdx/mise/blob/9dcfcaa0dc8747a2577d3270b69bb9d8313b2807/crates/aqua-registry/src/template.rs#L333-L369","documentation":"A command_wrapper must be defined by inline script 'content' or by wrapping an 'executable'; leaving both out gives mise nothing to install as the command. This parse-time bail fires when the options object contains neither key.","triggerScenarios":"command_wrapper options like {} or {\"args\": [...]}/ {\"env\": {...}} only — args/env alone do not define a wrapper.","commonSituations":"Metadata where the author assumed args imply an executable; partially deleted entries; templating that renders empty option objects.","solutions":["Add 'executable' pointing at the staged binary to wrap (most common), or add inline 'content'","Delete the command_wrapper artifact entirely if no wrapper is needed"],"exampleFix":"# before\n{\"command_wrapper\": [\"tool\", {\"args\": [\"--serve\"]}]}\n# after\n{\"command_wrapper\": [\"tool\", {\"executable\": \"bin/tool\", \"args\": [\"--serve\"]}]}","handlingStrategy":"validation","validationCode":"match (opts.get(\"content\"), opts.get(\"executable\")) {\n    (None, None) => /* reject: nothing defines the wrapper */,\n    _ => {},\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Every command_wrapper needs executable (preferred) or content","Remember args/env alone do not define a wrapper"],"tags":["rust","mise","brew-cask","command-wrapper","missing-field"],"backgroundTag":"missing-required-field","analyzedSha":"9dcfcaa0dc8747a2577d3270b69bb9d8313b2807","analyzedAt":"2026-08-17T14:28:50.624Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}