jdx/mise · error
{}: {}
Error message
{}: {} What it means
After composing the incoming configuration into file declarations, mise validates the resulting TrackedSet. Any declaration that is invalid (bad path, malformed footprint, out-of-scope file, etc.) is collected in `declarations.invalid`; the first one is reported as `<path>: <reason>`. This is a wrapper: the actual cause is the per-path reason stored by the declaration validator.
Source
Thrown at src/system/history/sync/preflight.rs:121
excludes.extend(history.exclude);
}
files.insert(
path,
Arc::new(parsed) as Arc<dyn crate::config::config_file::ConfigFile>,
);
}
// File composition expects highest precedence first.
files.reverse();
crate::system::files::validate_incoming_files(&files)?;
let requests = crate::system::files::files_from_config_files(&files);
crate::system::files::validate_composed_file_footprints(&requests)?;
let mut declarations = TrackedSet {
exclude: excludes,
..Default::default()
};
declarations.add_requests(requests);
if let Some(invalid) = declarations.invalid.first() {
bail!("{}: {}", invalid.path, invalid.reason);
}
declarations.exclude_set()?;
// The repository inventory, not a source or output mentioned by incoming
// configuration, determines which files the batch may install.
let mut prospective = tracked.clone();
prospective.required_sources = declarations.required_sources;
Ok(prospective)
}
/// Required source files must exist in the complete proposed write set or
/// already be available locally. A queued deletion is not an available source.
pub(super) fn sources(repo: &HistoryRepo, tracked: &TrackedSet, plans: &[PathPlan]) -> Result<()> {
let roots = Roots::current();
for source in &tracked.required_sources {
let planned = plans
.iter()
.find(|plan| roots.locate(&plan.branch_path).path() == Some(source.as_path()));
match planned.and_then(|plan| plan.apply.as_ref()) {View on GitHub (pinned to afd2eddd3a)
Solutions
- Read the reported `<path>: <reason>` message; it names the exact declaration and why it was rejected.
- Fix or remove the offending declaration in the shared config, commit, and re-pull.
- If the path is legitimately needed, move it inside the allowed roots/namespace supported by the tracked-file system.
Example fix
// before (shared config) [[files]] path = "/etc/anything-goes.conf" # outside managed roots // after [[files]] path = "~/.config/mise/conf.d/tools.toml" # within allowed roots
Defensive patterns
Strategy: validation
Validate before calling
const { invalid } = validateTrackedDeclarations(requests);
if (invalid.length > 0) {
throw new Error(`${invalid[0].path}: ${invalid[0].reason}`);
} Try / catch
try {
await applyIncoming();
} catch (e) {
const m = String(e.message).match(/^(.+?):\s(.+)$/);
if (m && isDeclarationReason(m[2])) {
console.error(`Fix declaration at ${m[1]}: ${m[2]}`);
} else throw e;
} Prevention
- Validate tracked-file declarations locally before pushing shared config changes.
- Keep declaration paths inside the documented managed roots.
- Use the schema/editor support for the tracked-files config section instead of hand-editing.
When it happens
Trigger: Incoming TOML configuration produces a file request that fails TrackedSet validation — e.g. a `[[files]]`/system-file declaration with an invalid path, a path outside allowed roots, or a footprint that fails `add_requests` validation. Raised when `declarations.invalid` is non-empty.
Common situations: A teammate hand-edited the managed-files section of the shared config and typoed a path; a declaration references a file outside the permitted roots; duplicated or overlapping declarations that the validator rejects.
Understand the failure class
Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.
Related errors
- managed path '{}' notifies unconfigured bootstrap service '{
- managed path '{}' notifies unconfigured bootstrap service '{
- cask uses `#{feature}`, which mise's cask shim does not supp
- formula uses `#{feature}`, which mise's source-build shim do
- windows_script_interpreter: {interpreter:?} must be a plain
AI-assisted analysis of jdx/mise@afd2eddd3a (2026-09-09).
Data as JSON: /api/errors/a6f4475d40cdef50.
Report an issue: GitHub.