{"record":{"id":"1faa1b756d09b4f2","repo":"jdx/mise","slug":"no-dotfiles-matched-target-filter-1faa1b","errorCode":null,"errorMessage":"no dotfiles matched target filter: {}","messagePattern":"no dotfiles matched target filter: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/cli/dotfiles/unapply.rs","lineNumber":54,"sourceCode":"        let files = all_files\n            .iter()\n            .filter(|req| {\n                system::files::matches_target(&req.target, &req.target_raw, &self.targets)\n            })\n            .cloned()\n            .collect::<Vec<_>>();\n        let all_edits = system::edits::edits_from_config(&config)?;\n        let edits = all_edits\n            .iter()\n            .filter(|req| system::edits::matches_target(req, &self.targets))\n            .cloned()\n            .collect::<Vec<_>>();\n        if files.is_empty()\n            && edits.is_empty()\n            && !self.targets.is_empty()\n            && (!all_files.is_empty() || !all_edits.is_empty())\n        {\n            eyre::bail!(\n                \"no dotfiles matched target filter: {}\",\n                self.targets.join(\", \")\n            );\n        }\n        if files.is_empty() && edits.is_empty() {\n            super::warn_if_dotfiles_ignored();\n            info!(\"no dotfiles configured in [dotfiles]\");\n            return Ok(());\n        }\n\n        let mut edit_opts = system::edits::UnapplyOpts {\n            dry_run: self.dry_run,\n            verbose: Settings::get().verbose,\n            force: self.force,\n            yes: self.yes,\n        };\n        let mut file_opts = system::files::UnapplyOpts {\n            dry_run: self.dry_run,","sourceCodeStart":36,"sourceCodeEnd":72,"githubUrl":"https://github.com/jdx/mise/blob/6f52dcdf99e282ef7a7db68c81301fa4618d0f79/src/cli/dotfiles/unapply.rs#L36-L72","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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"],"exampleFix":"# before\n$ mise bootstrap dotfiles unapply zsh\nerror: no dotfiles matched target filter: zsh\n\n# after\n$ mise bootstrap dotfiles unapply ~/.zshrc","handlingStrategy":"validation","validationCode":"# Guard unapply scripts against stale target lists\nfor t in \"${TARGETS[@]}\"; do\n  mise bootstrap dotfiles status | grep -qF \"$t\" || { echo \"stale target: $t\" >&2; exit 2; }\ndone\nmise bootstrap dotfiles unapply \"${TARGETS[@]}\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep unapply target lists in the same PR as [dotfiles] renames","Prefer unfiltered `unapply` in teardown scripts"],"tags":["mise","dotfiles","unapply","filter","no-match"],"backgroundTag":"filter-no-match","analyzedSha":"6f52dcdf99e282ef7a7db68c81301fa4618d0f79","analyzedAt":"2026-08-22T10:14:23.840Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T20:17:18.057Z"}