jdx/mise · error
inline content
Error message
inline content
What it means
A `.expect()` panic in mise's bootstrap managed-file writer (src/cli/bootstrap.rs:2269). Files with `FileMode::Content` must carry their payload inline in `file.content`; the panic fires when a content-mode file has no inline content, so the writer has nothing to write.
Solutions
- Set the `content` field for every file entry that uses mode "content"
- Switch the entry to mode "file"/"template" with a valid `source` path instead
- Validate file entries at parse time: content mode requires non-empty content
Example fix
// before
Ok(file.content.clone().expect("inline content"))
// after
file.content.clone().ok_or_else(|| anyhow!("file {} uses content mode but has no inline content", file.target.display())) Defensive patterns
Strategy: validation
Validate before calling
if file.mode == FileMode::Content && file.content.is_none() { return Err(anyhow!("file {} uses content mode without content", file.target.display())); } Type guard
let inline = file.content.as_deref().filter(|_| file.mode == FileMode::Content);
Try / catch
match file.content.clone() { Some(c) => write(c), None => bail!("missing inline content for {}", file.target.display()), } Prevention
- Validate [bootstrap.files] entries at config parse time
- Prefer mode "file" with a source path when content is not inline
- Snapshot-test managed file parsing for content/file mode pairs
When it happens
Trigger: A managed file entry declares `mode = "content"` (or the code sets FileMode::Content) but `content` was never populated — e.g. a config entry missing the `content` field or a template-render step that failed to fill it.
Common situations: Mistaken [bootstrap.files] entry with mode content but no content key; upstream refactors replacing file reads with inline content without updating all constructors.
Understand the failure class
Background: "is required", "must be set", "missing required field": configuration validation errors across open-source libraries — this error's family across 36 libraries.
Related errors
- config index exists
- declaring bootstrap config is loaded
- configured notifications came from managed files
- configured notifications prepared services
- enabled accounts were prepared
AI-assisted analysis of jdx/mise@afd2eddd3a (2026-09-09).
Data as JSON: /api/errors/19c97b904e97857b.
Report an issue: GitHub.
Appendix: source
Thrown at src/cli/bootstrap.rs:2269
let mut unavailable_bodies = HashSet::new();
for file in files {
if !is_mise_config_target(&file.target)
|| (file.mode != system::files::FileMode::Content && !file.source.is_file())
{
continue;
}
if file.mode == FileMode::Template {
config_files.shift_remove(&file.target);
unavailable_bodies.insert(file.target.clone());
debug!(
"bootstrap: template config target {} skipped in dry-run config simulation \
because template rendering may execute commands",
file.target.display()
);
continue;
}
let contents = if file.mode == system::files::FileMode::Content {
Ok(file.content.clone().expect("inline content"))
} else {
crate::file::read_to_string(&file.source)
};
match contents {
Ok(body) => match parse_mise_config_body(&file.target, &body) {
Ok(cf) => {
bodies.insert(file.target.clone(), body);
config_files.insert(file.target.clone(), cf);
}
Err(err) => {
warn!(
"[dotfiles].\"{}\": failed to parse config source {}: {err}",
file.target_raw,
file.source.display()
);
}
},
Err(err) => {View on GitHub (pinned to afd2eddd3a)