jdx/mise · error · eyre::Report
remote task path is not a regular file or directory
Error message
remote task path is not a regular file or directory: {} What it means
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.
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
Example fix
# before includes = ["git::https://github.com/org/repo.git#v1.2.0#path=tasks/old-name"] # after includes = ["git::https://github.com/org/repo.git#v1.2.0#path=tasks/new-name"]
Defensive patterns
Strategy: validation
Validate before calling
git ls-remote https://github.com/org/repo.git >/dev/null && \ git clone -q --depth 1 https://github.com/org/repo.git /tmp/chk && \ git -C /tmp/chk ls-tree --name-only HEAD tasks/ \ # confirm the #path fragment names a real file/dir at that ref
Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Understand the failure class
Background: "File not found" and ENOENT errors: why libraries can't find a file that should exist — this error's family across 50 libraries.
Related errors
- failed to list Git-tracked files in
- failed to locate Git repository for
- invalid tool path : contains forbidden character
- invalid tool path : extended-length and device paths (\\?\…
- relative repo path ` ` must name a directory inside the…
AI-assisted analysis of jdx/mise@6f52dcdf99 (2026-08-22).
Data as JSON: /api/errors/f65a9660a51bb89c.
Report an issue: GitHub.
Appendix: source
Thrown at src/config/mod.rs:4556
let checkout = checkout
.get_or_try_init(|| async {
let task_file_providers = TaskFileProvidersBuilder::new().with_cache(false).build();
let provider = task_file_providers
.get_provider(git_url)
.ok_or_else(|| eyre!("No provider found for git URL: {}", git_url))?;
let artifact = provider.get_local_artifact(git_url).await?;
let checkout_path = artifact
.cleanup_path()
.ok_or_else(|| eyre!("no cleanup path for no-cache Git task include"))?
.to_path_buf();
Ok::<TaskFileArtifact, eyre::Report>(artifact.with_path(checkout_path))
})
.await?;
let artifact = checkout.with_path(checkout.path.join(source.path));
let metadata = artifact.path.symlink_metadata()?;
if !metadata.file_type().is_file() && !metadata.file_type().is_dir() {
bail!(
"remote task path is not a regular file or directory: {}",
display_path(&artifact.path)
);
}
Ok(artifact)
}
/// Check if a pattern contains glob metacharacters
fn is_glob_pattern(pattern: &str) -> bool {
// Check for unescaped glob metacharacters: *, ?, [, ], {, }
// Note: This is a simple check that may have false positives with escaped chars,
// but glob() will handle those correctly
pattern.contains('*')
|| pattern.contains('?')
|| pattern.contains('[')
|| pattern.contains(']')
|| pattern.contains('{')
|| pattern.contains('}')View on GitHub (pinned to 6f52dcdf99)