jdx/mise · error
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
mise throws this when a path resolved from a remote git task source is neither a regular file nor a directory (e.g. a symlink, socket, or other special file). validate_remote_git_path stats the checked-out path and bails unless the entry type is file or dir, because task files can only be loaded from regular filesystem entries.
Source
Thrown at src/task/task_file_providers/remote_task_git.rs:89
/// regular file or directory.
pub(crate) fn validate_remote_git_path(
checkout_root: &Path,
path: &Path,
) -> Result<std::fs::Metadata> {
let metadata = path.symlink_metadata()?;
if !path
.canonicalize()?
.starts_with(checkout_root.canonicalize()?)
{
eyre::bail!(
"remote task path escapes its Git checkout: {}",
display_path(path)
);
}
if metadata.file_type().is_file() || metadata.file_type().is_dir() {
return Ok(metadata);
}
eyre::bail!(
"remote task path is not a regular file or directory: {}",
display_path(path)
)
}
impl RemoteTaskGit {
/// Make fetched task files executable while leaving task include directories intact.
fn prepare_remote_path(checkout_root: &Path, path: &Path) -> Result<()> {
if validate_remote_git_path(checkout_root, path)?
.file_type()
.is_file()
{
file::make_executable(path)?;
}
Ok(())
}
fn prepare_cached_path(checkout_root: &Path, path: &Path) -> Result<()> {View on GitHub (pinned to afd2eddd3a)
Solutions
- Inspect the resolved path with `ls -la` and replace any symlink/special file with a real file or directory
- Point the remote task config's dir/path option at a real directory in the repo instead of a symlinked path
- Update the upstream repo so task files are regular files, then re-fetch/re-clone the remote task source
- Remove stale cached checkouts of the remote task source so mise re-clones cleanly
Example fix
# before (.mise.toml) [task_config] source = "git::https://github.com/acme/tasks" dir = "shared-tasks" # symlink to ../other/tasks # after [task_config] source = "git::https://github.com/acme/tasks" dir = "shared-tasks" # real directory containing task files
Defensive patterns
Strategy: validation
Validate before calling
if [ ! -f "$TASK_PATH" ] && [ ! -d "$TASK_PATH" ]; then echo "remote task path must be a regular file or directory: $TASK_PATH"; exit 1; fi
Type guard
is_regular_path() { [ -f "$1" ] || [ -d "$1" ]; } Prevention
- Keep task files as real files/directories in remote task repos; avoid symlinks
- Verify the remote path with ls -la after configuring a git task source
- Clear the remote task cache after changing upstream repo structure
When it happens
Trigger: Configuring a remote task source (git URL) whose checkout path or in-repo task path resolves to a non-regular entry — most commonly a symlink in the repo pointing at the task file, or the configured subpath landing on a git submodule/special object.
Common situations: A repo stores its mise tasks behind a symlink; user points [task_config] remote source at a path like 'tasks' that is a symlink or unusual file type; odd filesystems report exotic file types after checkout.
Understand the failure class
Background: "is not a compatible type" / "cannot merge" errors: when a value's type doesn't match what the library requires — this error's family across 65 libraries.
Related errors
- remote task path is not a regular file or directory: {}
- failed to locate Git repository for {}: {}
- failed to list Git-tracked files in {}: {}
- task {} was not found after marking {} as executable
- rustc output is not a regular file: {}
AI-assisted analysis of jdx/mise@afd2eddd3a (2026-09-09).
Data as JSON: /api/errors/0f7a1055d3a87bcb.
Report an issue: GitHub.