jdx/mise · error
no dotfiles matched target filter
Error message
no dotfiles matched target filter: {} What it means
`mise dotfiles` throws this when a target filter (`mise dotfiles --target <name>`) matched none of the tracked dotfiles or saved edits, while the unfiltered set is non-empty. The library throws it to distinguish 'no dotfiles at all' from 'your filter is wrong', since the latter almost always means a typo or stale target name.
Solutions
- List available dotfile targets and use an exact existing name: `mise dotfiles` (no filter) to see what is tracked
- Check your `[dotfiles]` configuration to confirm the target exists and is tracked
- Remove or correct the --target flag if you actually want all dotfiles
- If the target should exist, track it first before filtering on it
Example fix
// before mise dotfiles --target nvim-confg // after mise dotfiles --target nvim-config # exact tracked target name
Defensive patterns
Strategy: validation
Validate before calling
targets=$(mise dotfiles --json | jq -r '.targets[]')
for t in nvim-config; do
echo "$targets" | grep -qx "$t" || { echo "unknown target: $t"; exit 1; }
done Try / catch
if ! mise dotfiles --target "$t"; then echo "target '$t' not tracked; run: mise dotfiles" fi
Prevention
- Always list tracked targets before filtering
- Keep target names centralized in scripts as variables sourced from config
- Rename targets in scripts and config atomically
- Prefer running unfiltered `mise dotfiles` when unsure
When it happens
Trigger: Calling dotfiles commands (e.g. `mise dotfiles --target foo`) with one or more targets when `files` and `edits` are both empty after filtering, but `all_files` or `all_edits` exist. The targets are joined into the message.
Common situations: Typo in a target name; referencing a dotfile target that was untracked or removed from `[dotfiles]` config; running on a machine where those files were never set up; renaming a target in config but keeping the old CLI flag in a script.
Understand the failure class
Background: EmptyResultError / "no results found": when an API or scraper succeeds but returns zero rows — this error's family across 9 libraries.
Related errors
- no dotfiles matched target filter
- no dotfiles matched target filter
- a glob is required
- `--all` needs `--to
- at least one target or --changed is required
AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17).
Data as JSON: /api/errors/4410c87f0f89dcd7.
Report an issue: GitHub.
Appendix: source
Thrown at src/cli/dotfiles/mod.rs:57
let all_files = crate::system::files::files_from_config(config)?;
crate::system::files::validate_composed_file_footprints(&all_files)?;
let files = all_files
.iter()
.filter(|req| crate::system::files::matches_target(&req.target, &req.target_raw, targets))
.cloned()
.collect::<Vec<_>>();
let all_edits = crate::system::edits::edits_from_config(config)?;
let edits = all_edits
.iter()
.filter(|req| crate::system::edits::matches_target(req, targets))
.cloned()
.collect::<Vec<_>>();
if files.is_empty()
&& edits.is_empty()
&& !targets.is_empty()
&& (!all_files.is_empty() || !all_edits.is_empty())
{
eyre::bail!("no dotfiles matched target filter: {}", targets.join(", "));
}
Ok((files, edits))
}
/// Manage dotfiles from `[dotfiles]`
#[derive(Debug, usage_rs::Args)]
#[usage(verbatim_doc_comment)]
pub(crate) struct Dotfiles {
#[usage(subcommand)]
command: Commands,
}
#[derive(Debug, usage_rs::Subcommands)]
enum Commands {
Add(add::DotfilesAdd),
Apply(apply::DotfilesApply),
Capture(capture::DotfilesCapture),
Conflicts(conflicts::DotfilesConflicts),View on GitHub (pinned to 533346cc37)