jdx/mise · error · eyre::Report

managed system files are only supported on Unix

Error message

managed system files are only supported on Unix

What it means

The managed system files/directories feature ([bootstrap.files] and [bootstrap.directories]) is implemented only on Unix. On non-Unix builds (e.g. Windows), the validation entry point unconditionally bails whenever any file or directory entries are declared. An empty set is allowed and silently skipped.

Solutions

  1. Run the bootstrap on a Unix machine (Linux/macOS); there is no Windows implementation.
  2. Remove or empty the [bootstrap.files]/[bootstrap.directories] sections on Windows to avoid the error.
  3. Gate the config behind a platform-conditional include or keep managed-file config in a machine-specific file not loaded on Windows.
Defensive patterns

Strategy: fallback

Validate before calling

if process.platform !== 'linux' && config['bootstrap']?.files?.length {
  throw new Error('[bootstrap.files] requires Unix; remove it on this platform');
}

Prevention

When it happens

Trigger: Running `mise bootstrap` (or any config load that validates it) on a non-Unix platform with at least one entry in [bootstrap.files] or [bootstrap.directories].

Common situations: Sharing one mise.toml across a team where some developers run Windows; CI on Windows runners picking up a config written for Linux servers.

Understand the failure class

Background: "unsupported platform" / "not supported on this platform" errors: what they mean and how to fix them — this error's family across 47 libraries.

Related errors


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

Appendix: source

Thrown at src/system/managed_files.rs:979

                    resolve_group(group)?;
                }
            }
        }
    }
    Ok(())
}

#[cfg(not(unix))]
pub(crate) fn validate_principals(
    files: &[ManagedFileRequest],
    directories: &[ManagedDirectoryRequest],
    _accounts: Option<&super::accounts::AccountRequests>,
    _allow_pending_accounts: bool,
) -> Result<()> {
    if files.is_empty() && directories.is_empty() {
        return Ok(());
    }
    bail!("managed system files are only supported on Unix")
}

impl PrivilegedAction {
    fn requires_preemptive_elevation(&self) -> Result<bool> {
        match self {
            // Ownership changes normally require privilege. Avoid creating or
            // replacing a path before discovering that at set_metadata().
            Self::WriteFile {
                path,
                owner,
                group,
                replace,
                ..
            } => Ok(owner.is_some()
                || group.is_some()
                || (*replace && replacement_is_not(path, ManagedPathKind::File)?)),
            Self::CreateDirectory {
                path,

View on GitHub (pinned to 533346cc37)