{"record":{"id":"0b10363d5d8fcaef","repo":"jdx/mise","slug":"dotfile-target-inline-content-does-not-support","errorCode":null,"errorMessage":"dotfile {target}: inline content does not support mode, exclude, or manifest","messagePattern":"dotfile (.+?): inline content does not support mode, exclude, or manifest","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/system/files.rs","lineNumber":706,"sourceCode":"                source,\n                content,\n                mode,\n                manifest,\n                exclude,\n                variants,\n                ..\n            } = entry\n            {\n                let implied_variant_source = validate_file_variants(\n                    &target,\n                    source.as_deref(),\n                    content.as_deref(),\n                    mode.as_deref(),\n                    variants.as_deref().unwrap_or_default(),\n                )?;\n                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                    );","sourceCodeStart":688,"sourceCodeEnd":724,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/system/files.rs#L688-L724","documentation":"Mise's dotfile declarations reject an inline `content` entry that also carries `mode`, `exclude`, or `manifest` keys. Inline content files are written verbatim, so those source-side options have no meaning for them; the preflight validator in validate_incoming_files bails rather than silently ignoring them. Remove the incompatible keys or switch the entry to a `source`-based declaration.","triggerScenarios":"Calling validate_incoming_files (via config parsing) on a `[files]`/dotfile TOML table where `content = \"...\"` coexists with `mode`, `exclude`, or `manifest`, e.g. `\"~/.gitconfig\" = { content = \"...\", mode = \"copy\" }`.","commonSituations":"Users copy a source-based dotfile entry and replace `source` with `content` but leave `mode`/`exclude`/`manifest` behind; generated configs that merge two templates; hand-edited config.toml where inline content was intended to be copy mode.","solutions":["Remove the `mode`, `exclude`, and `manifest` keys from the inline-content entry.","If you need mode/exclude/manifest, declare the entry with `source` pointing at a real file instead of inline `content`.","If the options were leftovers from a template, re-generate or simplify the dotfile declaration."],"exampleFix":"// before\n\"~/.gitignore\" = { content = \"node_modules/\", mode = \"copy\" }\n// after\n\"~/.gitignore\" = { content = \"node_modules/\" }","handlingStrategy":"validation","validationCode":"let keys = entry_table.keys().collect::<Vec<_>>();\nif entry_table.contains_key(\"content\")\n    && [\"mode\", \"exclude\", \"manifest\"].iter().any(|k| entry_table.contains_key(*k))\n{\n    return Err(\"inline content entries cannot set mode/exclude/manifest\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep inline `content` entries minimal: only the content key.","Add a config lint step that validates [files] tables before applying.","When converting source entries to content, delete obsolete sibling keys in the same edit."],"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"}