{"record":{"id":"4410c87f0f89dcd7","repo":"jdx/mise","slug":"no-dotfiles-matched-target-filter-4410c8","errorCode":null,"errorMessage":"no dotfiles matched target filter: {}","messagePattern":"no dotfiles matched target filter: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/cli/dotfiles/mod.rs","lineNumber":57,"sourceCode":"    let all_files = crate::system::files::files_from_config(config)?;\n    crate::system::files::validate_composed_file_footprints(&all_files)?;\n    let files = all_files\n        .iter()\n        .filter(|req| crate::system::files::matches_target(&req.target, &req.target_raw, targets))\n        .cloned()\n        .collect::<Vec<_>>();\n    let all_edits = crate::system::edits::edits_from_config(config)?;\n    let edits = all_edits\n        .iter()\n        .filter(|req| crate::system::edits::matches_target(req, targets))\n        .cloned()\n        .collect::<Vec<_>>();\n    if files.is_empty()\n        && edits.is_empty()\n        && !targets.is_empty()\n        && (!all_files.is_empty() || !all_edits.is_empty())\n    {\n        eyre::bail!(\"no dotfiles matched target filter: {}\", targets.join(\", \"));\n    }\n    Ok((files, edits))\n}\n\n/// Manage dotfiles from `[dotfiles]`\n#[derive(Debug, usage_rs::Args)]\n#[usage(verbatim_doc_comment)]\npub(crate) struct Dotfiles {\n    #[usage(subcommand)]\n    command: Commands,\n}\n\n#[derive(Debug, usage_rs::Subcommands)]\nenum Commands {\n    Add(add::DotfilesAdd),\n    Apply(apply::DotfilesApply),\n    Capture(capture::DotfilesCapture),\n    Conflicts(conflicts::DotfilesConflicts),","sourceCodeStart":39,"sourceCodeEnd":75,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/cli/dotfiles/mod.rs#L39-L75","documentation":"`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.","triggerScenarios":"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.","commonSituations":"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.","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"],"exampleFix":"// before\nmise dotfiles --target nvim-confg\n// after\nmise dotfiles --target nvim-config  # exact tracked target name","handlingStrategy":"validation","validationCode":"targets=$(mise dotfiles --json | jq -r '.targets[]')\nfor t in nvim-config; do\n  echo \"$targets\" | grep -qx \"$t\" || { echo \"unknown target: $t\"; exit 1; }\ndone","typeGuard":null,"tryCatchPattern":"if ! mise dotfiles --target \"$t\"; then\n  echo \"target '$t' not tracked; run: mise dotfiles\"\nfi","preventionTips":["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"],"tags":["cli","dotfiles","filter","no-match"],"backgroundTag":"empty-result-set","analyzedSha":"533346cc374382b41ec5ff70536252b2e96e725c","analyzedAt":"2026-09-17T13:35:38.149Z","contentChangedAt":"2026-09-17T13:35:38.149Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}