jdx/mise · error

invalid manifest for dotfile

Error message

invalid manifest {manifest:?} for dotfile {target}

What it means

The `manifest` key on a dotfile is only valid when its value parses as a FileManifest and the entry's mode is `copy` or `symlink-each`. Any other combination — an unparseable manifest value or manifest on symlink/copy/track/content modes — is rejected by validate_incoming_files.

Solutions

  1. Change the entry's mode to `copy` or `symlink-each`, which are the only modes supporting manifests.
  2. Fix the manifest value so it matches a valid FileManifest syntax (check FileManifest::parse).
  3. Remove the `manifest` key if per-file filtering is not needed.

Example fix

// before
"~/.config/app" = { source = "app", mode = "symlink", manifest = "*.conf" }
// after
"~/.config/app" = { source = "app", mode = "symlink-each", manifest = "*.conf" }
Defensive patterns

Strategy: validation

Validate before calling

if let Some(m) = entry_table.get("manifest").and_then(|v| v.as_str()) {
    assert!(matches!(mode, FileMode::Copy | FileMode::SymlinkEach), "manifest only valid for copy/symlink-each");
    assert!(FileManifest::parse(m).is_some(), "malformed manifest {m}");
}

Prevention

When it happens

Trigger: A dotfile entry sets `manifest = "..."` where the string does not match a known manifest format, or sets manifest on an entry whose mode is `symlink`, `copy` with malformed value, `track`, or `content`, e.g. `"~/.config/app" = { source = "app", mode = "symlink", manifest = "glob:*.conf" }`.

Common situations: Typos in the manifest syntax; copying a manifest from a symlink-each example onto a symlink entry; expecting manifest filtering to work in copy mode with a mode misspelling like `symlinkeach`.

Related errors


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

Appendix: source

Thrown at src/system/files.rs:740

                    bail!(
                        "tracked file {target} cannot declare source, content, manifest, or exclude"
                    );
                }
                if source.is_some() && content.is_some() {
                    bail!("dotfile {target} cannot declare both source and content");
                }
                if mode != FileMode::Track
                    && source.is_none()
                    && content.is_none()
                    && implied_variant_source.is_none()
                {
                    implied_source(&resolve_target_arg(&target))?;
                }
                if let Some(manifest) = manifest
                    && (FileManifest::parse(&manifest).is_none()
                        || !matches!(mode, FileMode::Copy | FileMode::SymlinkEach))
                {
                    bail!("invalid manifest {manifest:?} for dotfile {target}");
                }
                for pattern in exclude.into_iter().flatten() {
                    glob::Pattern::new(&pattern)?;
                }
            }
        }
    }
    Ok(())
}

/// Aggregate `[dotfiles]` across a specific set of config files. This is
/// used by OCI builds, which intentionally scope config to project files by
/// default instead of blindly inheriting global dotfiles.
pub(crate) fn files_from_config_files(config_files: &ConfigMap) -> Vec<FileRequest> {
    files_from_config_files_with_tracking_roots(config_files, None)
}

/// Resolve deployment overrides while limiting history enrollment to trusted roots.

View on GitHub (pinned to 533346cc37)