jdx/mise · error

dotfile : inline content does not support mode, exclude, or…

Error message

dotfile {target}: inline content does not support mode, exclude, or manifest

What it means

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.

Solutions

  1. Remove the `mode`, `exclude`, and `manifest` keys from the inline-content entry.
  2. If you need mode/exclude/manifest, declare the entry with `source` pointing at a real file instead of inline `content`.
  3. If the options were leftovers from a template, re-generate or simplify the dotfile declaration.

Example fix

// before
"~/.gitignore" = { content = "node_modules/", mode = "copy" }
// after
"~/.gitignore" = { content = "node_modules/" }
Defensive patterns

Strategy: validation

Validate before calling

let keys = entry_table.keys().collect::<Vec<_>>();
if entry_table.contains_key("content")
    && ["mode", "exclude", "manifest"].iter().any(|k| entry_table.contains_key(*k))
{
    return Err("inline content entries cannot set mode/exclude/manifest");
}

Prevention

When it happens

Trigger: 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" }`.

Common situations: 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.

Understand the failure class

Background: Conflicting config options: "cannot be used together" — configuration validation errors across open-source libraries — this error's family across 162 libraries.

Related errors


AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17). Data as JSON: /api/errors/0b10363d5d8fcaef. Report an issue: GitHub.

Appendix: source

Thrown at src/system/files.rs:706

                source,
                content,
                mode,
                manifest,
                exclude,
                variants,
                ..
            } = entry
            {
                let implied_variant_source = validate_file_variants(
                    &target,
                    source.as_deref(),
                    content.as_deref(),
                    mode.as_deref(),
                    variants.as_deref().unwrap_or_default(),
                )?;
                if content.is_some() && (mode.is_some() || exclude.is_some() || manifest.is_some())
                {
                    bail!(
                        "dotfile {target}: inline content does not support mode, exclude, or manifest"
                    );
                }
                let mode = match mode.as_deref() {
                    Some(value) => FileMode::parse(value).ok_or_else(|| {
                        eyre::eyre!("unknown dotfile mode {value:?} for {target}")
                    })?,
                    None => default_mode(),
                };
                if mode == FileMode::Track
                    && (source.is_some()
                        || content.is_some()
                        || manifest.is_some()
                        || exclude.is_some())
                {
                    bail!(
                        "tracked file {target} cannot declare source, content, manifest, or exclude"
                    );

View on GitHub (pinned to 533346cc37)