{"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":3346,"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":3328,"sourceCodeEnd":3364,"githubUrl":"https://github.com/jdx/mise/blob/6f52dcdf99e282ef7a7db68c81301fa4618d0f79/src/task/mod.rs#L3328-L3364","documentation":"During task-name pattern matching (get_matching), any pattern containing both '/' and ':' but not starting with '//' or ':' is rejected. Such a pattern looks like a monorepo project-path/task reference written with unsupported relative syntax, so mise fails fast instead of silently matching nothing.","triggerScenarios":"depends = [\"apps/web:build\"] or running `mise run src/api:test` — the pattern contains '/' and ':' yet starts with neither '//' nor ':'. The bail fires in the non-monorepo branch of the matcher before any name comparison happens.","commonSituations":"Migrating from another task runner's path:task syntax (e.g. turbo/nx style); typing a monorepo path and forgetting the leading double slash; converting a shell script that cd's into a subdirectory and runs a task there.","solutions":["Use absolute monorepo syntax from the workspace root: '//apps/web:build'","Or reference a task in the current config's directory with ':build'","Or use the plain task name if it is unique: 'build'"],"exampleFix":"# before\ndepends = [\"apps/web:build\"]\n\n# after\ndepends = [\"//apps/web:build\"]","handlingStrategy":"validation","validationCode":"# reject path-like task refs missing the // or : prefix\npython3 - <<'EOF'\nimport tomllib, sys\ncfg = tomllib.load(open('mise.toml','rb'))\nfor name, t in cfg.get('tasks', {}).items():\n    for d in t.get('depends', []):\n        s = str(d)\n        if '/' in s and ':' in s and not (s.startswith('//') or s.startswith(':')):\n            sys.exit(f\"{name}: use '//{s}' or ':task', got '{s}'\")\nprint('ok')\nEOF","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Memorize the two legal monorepo prefixes: '//path:task' (root-relative) and ':task' (current dir)","Let shell completion suggest task names instead of typing paths"],"tags":["mise","tasks","pattern-matching","monorepo","configuration"],"backgroundTag":"monorepo-task-path-syntax","analyzedSha":"6f52dcdf99e282ef7a7db68c81301fa4618d0f79","analyzedAt":"2026-08-22T10:14:23.840Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T15:18:49.778Z"}