{"record":{"id":"bb529b1b981c8571","repo":"jdx/mise","slug":"tracked-file-target-cannot-declare-source-conte","errorCode":null,"errorMessage":"tracked file {target} cannot declare source, content, manifest, or exclude","messagePattern":"tracked file (.+?) cannot declare source, content, manifest, or exclude","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/system/files.rs","lineNumber":722,"sourceCode":"                if content.is_some() && (mode.is_some() || exclude.is_some() || manifest.is_some())\n                {\n                    bail!(\n                        \"dotfile {target}: inline content does not support mode, exclude, or manifest\"\n                    );\n                }\n                let mode = match mode.as_deref() {\n                    Some(value) => FileMode::parse(value).ok_or_else(|| {\n                        eyre::eyre!(\"unknown dotfile mode {value:?} for {target}\")\n                    })?,\n                    None => default_mode(),\n                };\n                if mode == FileMode::Track\n                    && (source.is_some()\n                        || content.is_some()\n                        || manifest.is_some()\n                        || exclude.is_some())\n                {\n                    bail!(\n                        \"tracked file {target} cannot declare source, content, manifest, or exclude\"\n                    );\n                }\n                if source.is_some() && content.is_some() {\n                    bail!(\"dotfile {target} cannot declare both source and content\");\n                }\n                if mode != FileMode::Track\n                    && source.is_none()\n                    && content.is_none()\n                    && implied_variant_source.is_none()\n                {\n                    implied_source(&resolve_target_arg(&target))?;\n                }\n                if let Some(manifest) = manifest\n                    && (FileManifest::parse(&manifest).is_none()\n                        || !matches!(mode, FileMode::Copy | FileMode::SymlinkEach))\n                {\n                    bail!(\"invalid manifest {manifest:?} for dotfile {target}\");","sourceCodeStart":704,"sourceCodeEnd":740,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/system/files.rs#L704-L740","documentation":"A dotfile entry whose mode resolves to `track` (the tracking mode) must not declare `source`, `content`, `manifest`, or `exclude`. Track mode manages an existing file in place; there is nothing to copy from or filter, so any of these keys is a contradiction and validate_incoming_files rejects the entry.","triggerScenarios":"validate_incoming_files sees a dotfile table with `mode = \"track\"` (or defaulting to track) that also specifies `source`, `content`, `manifest`, or `exclude`, e.g. `\"~/.zshrc\" = { mode = \"track\", source = \"~/dotfiles/zshrc\" }`.","commonSituations":"Migrating an existing source-based entry to track mode without deleting the source/content keys; assuming track takes a source to bootstrap; pasting an exclude list copied from a symlink entry.","solutions":["Delete the `source`, `content`, `manifest`, and `exclude` keys from the track-mode entry.","If you intended to deploy a file from the dotfiles repo, use `mode = \"copy\"` or `mode = \"symlink\"` instead of track.","If the file already exists at the target, drop the extra keys and let track manage it in place."],"exampleFix":"// before\n\"~/.zshrc\" = { mode = \"track\", source = \"dotfiles/zshrc\" }\n// after\n\"~/.zshrc\" = { mode = \"track\" }","handlingStrategy":"validation","validationCode":"if entry_table.get(\"mode\").and_then(|m| m.as_str()) == Some(\"track\") {\n    for banned in [\"source\", \"content\", \"manifest\", \"exclude\"] {\n        assert!(!entry_table.contains_key(banned), \"track entry must not set {banned}\");\n    }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Remember track mode manages an existing file: it needs no source-side options.","Use schema-aware editor support for mise.toml [files] tables.","Review dotfile entries after mode migrations."],"tags":["dotfiles","config-validation","mise"],"backgroundTag":"conflicting-config-options","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"}