{"record":{"id":"0d28c2061a5d782b","repo":"jdx/mise","slug":"relative-path-syntax-is-not-supported-use","errorCode":null,"errorMessage":"relative path syntax '{}' is not supported, use '//{}'  or ':task' for current directory","messagePattern":"relative path syntax '(.+?)' is not supported, use '//(.+?)'  or ':task' for current directory","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/task/mod.rs","lineNumber":3513,"sourceCode":"                .iter()\n                .filter(|(name, _)| {\n                    name.split_once('#').is_some_and(|(project, task)| {\n                        project_matcher.is_match(project)\n                            && task_name_matches(&task_matcher, task, false)\n                    })\n                })\n                .map(|(_, task)| task)\n                .unique()\n                .collect());\n        }\n\n        // === Monorepo pattern matching ===\n        // Only patterns starting with '//' or ':' are monorepo patterns\n        // Reject patterns that look like monorepo paths but use wrong syntax (have / and : but don't start with // or :)\n        if !pat.starts_with(\"//\") && !pat.starts_with(':') {\n            // Check if this looks like an attempt at a monorepo path with wrong syntax\n            if pat.contains('/') && pat.contains(':') {\n                bail!(\n                    \"relative path syntax '{}' is not supported, use '//{}'  or ':task' for current directory\",\n                    pat,\n                    pat\n                )\n            }\n            // If it doesn't contain glob syntax or ':', it's a simple task name\n            if !pat.contains(['*', '?', '[', '{']) && !pat.contains(\"...\") && !pat.contains(':') {\n                // Prefer exact name matches; only fall back to extension-stripped\n                // matches when there is no exact match. Otherwise a TOML task\n                // \"hello\" and an auto-discovered file task \"hello.sh\" would both\n                // match `mise run hello` and run the script twice (#10298).\n                let exact: Vec<&T> = self\n                    .iter()\n                    .filter(|(k, _)| k.as_str() == pat)\n                    .map(|(_, v)| v)\n                    .collect();\n                if !exact.is_empty() {\n                    return Ok(exact);","sourceCodeStart":3495,"sourceCodeEnd":3531,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/task/mod.rs#L3495-L3531","documentation":"In monorepo pattern matching, patterns must either be plain task names or explicit monorepo patterns starting with '//' (workspace-root path) or ':' (current directory). A pattern containing both '/' and ':' is rejected as ambiguous relative-path syntax, with a hint to use '//...' or ':task'.","triggerScenarios":"Passing a pattern like `./pkg/util:build` or `pkg/util:build` (relative path + task, not starting with '//' or ':') to task matching, e.g. `mise run pkg/util:build` or as a `depends` entry.","commonSituations":"Users guessing monorepo task syntax and writing a filesystem-relative path instead of the supported '//path:task' or ':task' forms.","solutions":["Use '//pkg/util:build' to reference the task from the workspace root","Use ':build' if the task is in the current directory","Drop the path entirely and use the plain task name if it is unambiguous"],"exampleFix":"// before\nmise run pkg/util:build\n\n// after\nmise run //pkg/util:build","handlingStrategy":"validation","validationCode":"function normalizeTaskPattern(pat) {\n  if (pat.includes('/') && pat.includes(':') && !pat.startsWith('//') && !pat.startsWith(':')) {\n    return '//' + pat.replace(/^\\.\\//, '');\n  }\n  return pat;\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Only use '//path:task' or ':task' forms for path-qualified task references","Never write filesystem-relative paths like './pkg:x' as task patterns","Prefer plain task names when they are unique in the workspace"],"tags":["tasks","monorepo","cli","syntax"],"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"}