jdx/mise · error
source directory is missing, so managed children cannot be…
Error message
source directory is missing, so managed children cannot be identified
What it means
For a Copy entry with a directory source, unapply identifies managed children by walking the source tree. If the source directory no longer exists, mise cannot tell which files under the target were created by it and which are user-owned, so it aborts that entry rather than risking deletion of unmanaged files.
Solutions
- Restore the source directory (re-clone the dotfiles repo or move it back) and re-run unapply.
- Fix the `source` path in the `[dotfiles]` entry if it was renamed.
- If the source is unrecoverable and you accept removing the whole target, delete the target directory manually and remove the entry from config.
Example fix
// before: source ~/dotfiles/nvim deleted, target ~/.config/nvim remains git clone git@github.com:you/dotfiles.git ~/dotfiles mise dot unapply # now the source walk can identify managed children
Defensive patterns
Strategy: validation
Validate before calling
src="$HOME/dotfiles/nvim"; [ -d "$src" ] || echo "source directory missing: $src"; grep -A1 '\[dotfiles\]' mise.toml
Prevention
- Never delete or move the dotfiles source repo while entries are applied.
- Update `[dotfiles]` source paths in the same commit/step that moves the repo.
- Keep the source repo under version control so accidental deletions are recoverable.
When it happens
Trigger: `mise dot unapply` (or a planning pass) on a Copy entry where the source directory was deleted/renamed while the target directory still exists.
Common situations: The dotfiles repository was deleted or moved without updating the config; a partial clone or sync removed the source subdirectory; typo introduced in the config `source` path during editing.
Related errors
- source is missing; use --force to remove the target
- a glob is required
- `--all` needs `--to
- an implied source entry key must be relative
- an implied source entry key must not be empty
AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17).
Data as JSON: /api/errors/26f8d49270917d74.
Report an issue: GitHub.
Appendix: source
Thrown at src/system/files.rs:2792
}
}
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)?;
}
// a tracked file was never written by mise: stop tracking it with
// `mise dot untrack`, the file itself stays
FileMode::Track => {
info!(
"files: {} is tracked in place; nothing to remove (use `mise dot untrack` to stop tracking it)",
req.target.display_user()
);
return Ok(None);
}
FileMode::Content => {
if !req.target.exists() && !req.target.is_symlink() {
return Ok(None);
}
if opts.force {
paths.insert(req.target.clone(), ());View on GitHub (pinned to 533346cc37)