jdx/mise · error
dotfile {target}: inline content does not support mode, excl
Error message
dotfile {target}: inline content does not support mode, exclude, or manifest What it means
Inline `content` dotfiles are written directly with fixed defaults; the concepts of mode, exclude patterns, and manifests only make sense for sourced files (copy/symlink from the dotfiles root). If a table entry sets `content` together with any of `mode`, `exclude`, or `manifest`, validation fails because the combination is unsupported rather than partially honored.
Source
Thrown at src/system/files.rs:594
);
}
}
}
if resolve_target_arg(&target).is_relative() {
bail!("dotfile target must be absolute or start with ~/: {target}");
}
if let FileTomlEntry::Table {
source,
content,
mode,
manifest,
exclude,
..
} = entry
{
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 afd2eddd3a)
Solutions
- Remove `mode`, `exclude`, and `manifest` keys from the entry that uses `content`.
- If you need a specific file mode or exclusions, switch back to `source` (a file in the dotfiles root) and keep those keys there.
- Set the desired permissions directly on the source file if using symlink/copy mode.
Example fix
// before [dotfiles."~/.netrc"] content = "machine ..." mode = "600" // after [dotfiles."~/.netrc"] content = "machine ..."
Defensive patterns
Strategy: validation
Validate before calling
function assertInlineContentEntry(entry, target) {
if (entry.content != null && ['mode','exclude','manifest'].some(k => k in entry))
throw new Error(`${target}: inline content cannot combine with mode/exclude/manifest`);
} Try / catch
try {
applyDotfiles();
} catch (e) {
if (/inline content does not support/.test(e.message)) {
console.error('Strip mode/exclude/manifest from the content-based entry or switch to source');
} else throw e;
} Prevention
- Treat `content` entries as minimal: only `content` (plus encrypt/autosave/enabled)
- When converting source entries to content, delete leftover provisioning keys
- Keep a lint rule that flags content + mode/exclude/manifest combinations
When it happens
Trigger: Declaring e.g. `[dotfiles."~/.x"]` with `content = "..."` plus `mode = "755"`, `exclude = [...]`, or `manifest = "..."` in the same table.
Common situations: Converting an existing source-based entry to inline content but leaving `mode`/`exclude` behind, or copy-pasting a template entry and swapping `source` for `content` without cleaning up other keys.
Related errors
- invalid dotfile declaration {target} in {}
- unknown dotfile key {key:?} for {target} in {}
- tracked file {target} cannot declare source, content, manife
- dotfile {target} cannot declare both source and content
- invalid manifest {manifest:?} for dotfile {target}
AI-assisted analysis of jdx/mise@afd2eddd3a (2026-09-09).
Data as JSON: /api/errors/0b10363d5d8fcaef.
Report an issue: GitHub.