jdx/mise · error · eyre::Report
source directory is missing, so managed children cannot be i
Error message
source directory is missing, so managed children cannot be identified
What it means
For a `copy`-mode entry whose target is a directory, mise must walk the source directory to know which target children it owns. If the source directory no longer exists, managed children cannot be identified and the unapply aborts; only `--force` (which removes the target without per-child verification) proceeds.
Source
Thrown at src/system/files.rs:1581
}
}
FileMode::Copy | FileMode::SymlinkEach if req.source.is_dir() => {
if req.target.is_symlink() || (req.target.exists() && !req.target.is_dir()) {
if opts.force {
paths.insert(req.target.clone(), ());
} else {
bail!("target is not the managed directory, use --force to remove it");
}
} else if req.target.is_dir() {
for (source, target) in walk_source_files(req)? {
plan_regular_file(&source, &target, opts.force, &mut paths)?;
}
cleanup_empty_dirs = true;
}
}
FileMode::Copy => {
if req.target.is_dir() && !req.source.exists() {
bail!("source directory is missing, so managed children cannot be identified");
}
plan_single_file(req, opts, &mut paths)?;
}
FileMode::Content => {
if !req.target.exists() && !req.target.is_symlink() {
return Ok(None);
}
if opts.force {
paths.insert(req.target.clone(), ());
} else {
plan_inline_file(req, &mut paths)?;
}
}
FileMode::Symlink => {
plan_single_file(req, opts, &mut paths)?;
}
FileMode::SymlinkEach => {
bail!("mode symlink-each requires the source to be a directory");View on GitHub (pinned to 6f52dcdf99)
Solutions
- Restore or re-point the source directory (git checkout, fix the `source` path in mise.toml), then unapply
- If the copied tree is disposable, `mise bootstrap dotfiles unapply --force`
- Delete the `[dotfiles]` entry if you no longer manage that target
Example fix
# before: source dir was moved in the dotfiles repo $ ls ~/dotfiles/ssh-old # config still says source = "~/dotfiles/ssh-old" ls: cannot access '~/dotfiles/ssh-old': No such file or directory $ mise bootstrap dotfiles unapply Error: source directory is missing, so managed children cannot be identified # after: fix the path (or restore the dir), then unapply $ sed -i 's#~/dotfiles/ssh-old#~/dotfiles/ssh#' mise.toml $ mise bootstrap dotfiles unapply --dry-run && mise bootstrap dotfiles unapply
Defensive patterns
Strategy: validation
Validate before calling
# Verify every dotfiles source path exists before unapplying.
mise config ls 2>/dev/null || true
for p in ~/dotfiles/ssh ~/dotfiles/nvim; do
[ -e "$p" ] || { echo "missing source: $p"; exit 1; }
done Type guard
fn is_missing_source_dir(err: &miette::Report) -> bool {
err.to_string().contains(
"source directory is missing, so managed children cannot be identified",
)
} Prevention
- Keep `source` paths relative to the repo and machine-independent
- Run `git mv` + config update together when reorganizing dotfiles
- Ensure submodules holding sources are initialized on every machine
When it happens
Trigger: `unapply` of a copy entry where `req.target.is_dir()` and `!req.source.exists()` — the source directory was deleted or moved, its path in mise.toml is wrong (typo, machine-specific absolute path), or it lives in an uncloned submodule.
Common situations: Dotfiles repo reorganized (dir renamed) without updating mise.toml; source in a submodule that was not initialized; absolute path from another machine.
Related errors
- cannot verify {}; use --force to remove it
- source is missing; use --force to remove the target
- no dotfiles matched target filter: {}
- files: cannot unapply these entries:\n{}
- target symlink points to {}, use --force to remove it
AI-assisted analysis of jdx/mise@6f52dcdf99 (2026-08-22).
Data as JSON: /api/errors/26f8d49270917d74.
Report an issue: GitHub.