jdx/mise · error

mise oci does not support [bootstrap.macos.*] defaults (foun

Error message

mise oci does not support [bootstrap.macos.*] defaults (found {defaults} default entries); macOS defaults do not apply to OCI images.

What it means

Before building an OCI image, mise scans the effective config files for [bootstrap.macos.*] entries (Homebrew packages, system defaults) and counts macos defaults. Any nonzero count aborts: macOS bootstrap defaults (e.g. `defaults write` style settings) have no meaning in a Linux container, so carrying them over would either mislead or break the build. This is a hard fail-fast, not a warning.

Source

Thrown at src/cli/oci/common.rs:143

    // image either.
    ToolsetBuilder::new()
        .with_config_files(project_files)
        .with_scope(ConfigScope::LocalOnly)
        .build(config)
        .await
}

fn reject_unsupported_system_defaults(config_files: &ConfigMap) -> Result<()> {
    let mut defaults = 0usize;
    for cf in config_files.values() {
        let Some(system) = cf.bootstrap_config() else {
            continue;
        };
        defaults += system::macos_defaults_entry_count(&system.macos);
    }

    if defaults > 0 {
        bail!(
            "mise oci does not support [bootstrap.macos.*] defaults (found {defaults} default entries); \
             macOS defaults do not apply to OCI images."
        );
    }
    Ok(())
}

pub fn short_digest(d: &str) -> String {
    let hex = d.trim_start_matches("sha256:");
    if hex.len() >= 12 {
        format!("sha256:{}", &hex[..12])
    } else {
        d.to_string()
    }
}

#[cfg(test)]
mod tests {

View on GitHub (pinned to 9dcfcaa0dc)

Solutions

  1. Move [bootstrap.macos.*] entries out of the config files involved in the oci build (e.g. into a macOS-only layer such as mise.local.toml or a platform-specific include)
  2. Delete the macos defaults if the project no longer needs them on macOS either
  3. If using --include-global, clean macOS defaults from the global config or stop including global config for oci builds

Example fix

# before: mise.toml
[bootstrap.macos]
defaults = { "com.example.tool" = { KeyType = "value" } }

# after: mise.toml (macos defaults removed / moved to mise.local.toml)
[tools]
node = "22"
Defensive patterns

Strategy: validation

Validate before calling

#!/usr/bin/env bash
if grep -rqE '^\[bootstrap\.macos' mise.toml mise.local.toml 2>/dev/null; then
  echo "[bootstrap.macos] present; oci builds reject macos defaults" >&2; exit 2
fi
mise oci build

Try / catch

mise oci build 2>err.log || { grep -q 'bootstrap.macos' err.log && echo "move/delete [bootstrap.macos] entries from project config" >&2; exit 2; }

Prevention

When it happens

Trigger: A shared mise.toml used for both macOS workstations and CI image builds containing `[bootstrap.macos]` defaults entries; monorepo root config with macos bootstrap inherited by every package's oci build; --include-global pulling in a global config that has macOS defaults.

Common situations: Teams standardizing dev-env bootstrap across platforms and then adopting `mise oci` for deployment images; the macos section written by a teammate on macOS and CI (Linux) hits the oci guard.

Related errors


AI-assisted analysis of jdx/mise@9dcfcaa0dc (2026-08-17). Data as JSON: /api/errors/5c6f5923d35e1cdc. Report an issue: GitHub.