jdx/mise · error
no dotfiles matched target filter: {}
Error message
no dotfiles matched target filter: {} What it means
Thrown by `mise bootstrap dotfiles unapply [TARGET]...` with the same guard as `status`: filters were supplied, nothing matched, yet the config does define dotfiles. mise refuses to continue so a mistyped target cannot make `unapply` look like success — the no-filter, nothing-configured case only prints an info message, never this error.
Source
Thrown at src/cli/dotfiles/unapply.rs:54
let files = all_files
.iter()
.filter(|req| {
system::files::matches_target(&req.target, &req.target_raw, &self.targets)
})
.cloned()
.collect::<Vec<_>>();
let all_edits = system::edits::edits_from_config(&config)?;
let edits = all_edits
.iter()
.filter(|req| system::edits::matches_target(req, &self.targets))
.cloned()
.collect::<Vec<_>>();
if files.is_empty()
&& edits.is_empty()
&& !self.targets.is_empty()
&& (!all_files.is_empty() || !all_edits.is_empty())
{
eyre::bail!(
"no dotfiles matched target filter: {}",
self.targets.join(", ")
);
}
if files.is_empty() && edits.is_empty() {
super::warn_if_dotfiles_ignored();
info!("no dotfiles configured in [dotfiles]");
return Ok(());
}
let mut edit_opts = system::edits::UnapplyOpts {
dry_run: self.dry_run,
verbose: Settings::get().verbose,
force: self.force,
yes: self.yes,
};
let mut file_opts = system::files::UnapplyOpts {
dry_run: self.dry_run,View on GitHub (pinned to 6f52dcdf99)
Solutions
- List valid targets with `mise bootstrap dotfiles status` (no args) and correct the filter
- Match the exact `target`/`path` string from the config, including the `~/` prefix as written
- Drop the filters to unapply everything, if that is the intent
- Keep unapply scripts in sync with the `[dotfiles]` section after renames
Example fix
# before $ mise bootstrap dotfiles unapply zsh error: no dotfiles matched target filter: zsh # after $ mise bootstrap dotfiles unapply ~/.zshrc
Defensive patterns
Strategy: validation
Validate before calling
# Guard unapply scripts against stale target lists
for t in "${TARGETS[@]}"; do
mise bootstrap dotfiles status | grep -qF "$t" || { echo "stale target: $t" >&2; exit 2; }
done
mise bootstrap dotfiles unapply "${TARGETS[@]}" Prevention
- Keep unapply target lists in the same PR as [dotfiles] renames
- Prefer unfiltered `unapply` in teardown scripts
When it happens
Trigger: Running `mise bootstrap dotfiles unapply vim` when the configured target is `~/.config/nvim/init.lua`, or passing a glob the config never declared: the filter over both `files` and `edits` yields empty vectors while `all_files`/`all_edits` are non-empty.
Common situations: Cleanup scripts that unapply a list of dotfiles after a name refactor; using a task name or tool name instead of the dotfile target path; config entries removed from mise.toml while the unapply script still lists the old targets.
Related errors
- no dotfiles matched target filter: {}
- files: cannot unapply these entries:\n{}
- target symlink points to {}, use --force to remove it
- target is not the managed symlink, use --force to remove it
- target is not the managed directory, use --force to remove i
AI-assisted analysis of jdx/mise@6f52dcdf99 (2026-08-22).
Data as JSON: /api/errors/1faa1b756d09b4f2.
Report an issue: GitHub.