{"record":{"id":"e453ffc53a00c0b1","repo":"jdx/mise","slug":"target-raw-is-not-tracked","errorCode":null,"errorMessage":"{target_raw} is not tracked","messagePattern":"(.+?) is not tracked","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/cli/dotfiles/untrack.rs","lineNumber":80,"sourceCode":"                            \"dotfiles: {key} is declared in {}; switched off in {}\",\n                            display_path(declared_in),\n                            display_path(&local)\n                        );\n                        touched.push(local.clone());\n                    } else {\n                        let mut doc = super::track::read_document(declared_in)?;\n                        if let Some(table) = doc[\"dotfiles\"].as_table_mut() {\n                            table.remove(&req.target_raw);\n                        }\n                        file::write(declared_in, doc.to_string())?;\n                        info!(\"dotfiles: {key} removed from {}\", display_path(declared_in));\n                        touched.push(declared_in.clone());\n                    }\n                }\n                None => {\n                    // A child of an explicitly tracked directory: exclude it.\n                    let Some(owner) = tracked.entry_for(&path) else {\n                        bail!(\"{target_raw} is not tracked\");\n                    };\n                    if owner.path == path {\n                        // Keep explicit intent visible to an enclosing capture\n                        // too, even when enrollment came only from Git.\n                        let mut doc = super::track::read_document(&local)?;\n                        let mut table = toml_edit::InlineTable::new();\n                        table.insert(\"mode\", Value::from(\"track\"));\n                        table.insert(\"enabled\", Value::from(false));\n                        doc[\"dotfiles\"][&key] = Item::Value(Value::InlineTable(table));\n                        if let Some(parent) = local.parent() {\n                            file::create_dir_all(parent)?;\n                        }\n                        file::write(&local, doc.to_string())?;\n                        touched.push(local.clone());\n                        continue;\n                    }\n                    let glob = if path.is_dir() {\n                        format!(\"{key}/**\")","sourceCodeStart":62,"sourceCodeEnd":98,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/cli/dotfiles/untrack.rs#L62-L98","documentation":"`mise dotfiles untrack` throws this when the given target path has no entry in the tracked-dotfiles set. Untracking a directory child requires an owning tracked entry; if neither the path itself nor any tracked parent directory covers it, mise refuses because there is nothing to untrack.","triggerScenarios":"Running `mise dotfiles untrack <path>` where <path> was never enrolled via `mise dotfiles track`, and no explicitly tracked directory contains it as a child (tracked.entry_for(&path) returns None in the None arm of the match).","commonSituations":"Typos in the path, untracking a file that was only managed by Git without a parent tracked directory, or trying to untrack something already removed from tracking in an earlier run.","solutions":["Run `mise dotfiles ls` (or inspect the tracked set) to confirm the exact path or an ancestor directory is tracked","Track the path first with `mise dotfiles track <path>` if it should be managed, then untrack it","Check for path typos or symlink/relative-vs-absolute path mismatches between what you typed and what was tracked"],"exampleFix":"// before\nmise dotfiles untrack ~/.vimrc   // never tracked\n// after\nmise dotfiles track ~/.vimrc && mise dotfiles untrack ~/.vimrc\n// or untrack the tracked parent instead:\nmise dotfiles untrack ~/.config","handlingStrategy":"validation","validationCode":"mise dotfiles ls | grep -x \"$HOME/.vimrc\" || echo 'not tracked'","typeGuard":null,"tryCatchPattern":null,"preventionTips":["List tracked paths before untracking","Track paths consistently via a single parent directory to simplify untracking"],"tags":["cli","dotfiles","not-found"],"backgroundTag":"resource-not-found","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"}