{"record":{"id":"f65a9660a51bb89c","repo":"jdx/mise","slug":"remote-task-path-is-not-a-regular-file-or-director","errorCode":null,"errorMessage":"remote task path is not a regular file or directory: {}","messagePattern":"remote task path is not a regular file or directory: (.+?)","errorType":"exception","errorClass":"eyre::Report","httpStatus":null,"severity":"error","filePath":"src/config/mod.rs","lineNumber":4556,"sourceCode":"    let checkout = checkout\n        .get_or_try_init(|| async {\n            let task_file_providers = TaskFileProvidersBuilder::new().with_cache(false).build();\n            let provider = task_file_providers\n                .get_provider(git_url)\n                .ok_or_else(|| eyre!(\"No provider found for git URL: {}\", git_url))?;\n            let artifact = provider.get_local_artifact(git_url).await?;\n            let checkout_path = artifact\n                .cleanup_path()\n                .ok_or_else(|| eyre!(\"no cleanup path for no-cache Git task include\"))?\n                .to_path_buf();\n            Ok::<TaskFileArtifact, eyre::Report>(artifact.with_path(checkout_path))\n        })\n        .await?;\n\n    let artifact = checkout.with_path(checkout.path.join(source.path));\n    let metadata = artifact.path.symlink_metadata()?;\n    if !metadata.file_type().is_file() && !metadata.file_type().is_dir() {\n        bail!(\n            \"remote task path is not a regular file or directory: {}\",\n            display_path(&artifact.path)\n        );\n    }\n    Ok(artifact)\n}\n\n/// Check if a pattern contains glob metacharacters\nfn is_glob_pattern(pattern: &str) -> bool {\n    // Check for unescaped glob metacharacters: *, ?, [, ], {, }\n    // Note: This is a simple check that may have false positives with escaped chars,\n    // but glob() will handle those correctly\n    pattern.contains('*')\n        || pattern.contains('?')\n        || pattern.contains('[')\n        || pattern.contains(']')\n        || pattern.contains('{')\n        || pattern.contains('}')","sourceCodeStart":4538,"sourceCodeEnd":4574,"githubUrl":"https://github.com/jdx/mise/blob/6f52dcdf99e282ef7a7db68c81301fa4618d0f79/src/config/mod.rs#L4538-L4574","documentation":"After fetching a `git::` task include, mise joins the URL's path fragment onto the checkout directory and stats it with symlink_metadata. Anything that is not a plain regular file or directory — a symlink (which is not followed here), a path missing at the pinned ref, or a special file — fails with this error.","triggerScenarios":"A `git::...#path=` fragment naming a symlink inside the repo, a path that does not exist at the checked-out ref (renamed/moved file, wrong case), or a stale cached checkout lacking the path.","commonSituations":"Path fragment written against the default branch while the include pins a ref where the file moved; repos using symlinks for shared task files; case-sensitivity differences between macOS and Linux checkouts.","solutions":["Confirm the path exists at the ref you pin: `git ls-tree <ref> <path>` in the source repo","Point the fragment at a real file or directory in the repo, not a symlink","Fix or drop the `#ref`/`#path` fragments so they resolve in the current checkout","If a stale cached checkout is suspected, re-run with `task.remote_no_cache = true` to force a fresh clone"],"exampleFix":"# before\nincludes = [\"git::https://github.com/org/repo.git#v1.2.0#path=tasks/old-name\"]\n\n# after\nincludes = [\"git::https://github.com/org/repo.git#v1.2.0#path=tasks/new-name\"]","handlingStrategy":"validation","validationCode":"git ls-remote https://github.com/org/repo.git >/dev/null && \\\n  git clone -q --depth 1 https://github.com/org/repo.git /tmp/chk && \\\n  git -C /tmp/chk ls-tree --name-only HEAD tasks/ \\\n  # confirm the #path fragment names a real file/dir at that ref","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Pin refs that actually contain the path you reference — verify with git ls-tree","Avoid symlinks in repos consumed via git:: task includes (they are not followed)","When a ref renames files, update include fragments in the same commit","Force a fresh fetch with task.remote_no_cache if checkouts seem stale"],"tags":["mise","tasks","git","path","includes"],"backgroundTag":"file-not-found","analyzedSha":"6f52dcdf99e282ef7a7db68c81301fa4618d0f79","analyzedAt":"2026-08-22T10:14:23.840Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}