{"record":{"id":"5c6f5923d35e1cdc","repo":"jdx/mise","slug":"mise-oci-does-not-support-bootstrap-macos-defa","errorCode":null,"errorMessage":"mise oci does not support [bootstrap.macos.*] defaults (found {defaults} default entries); macOS defaults do not apply to OCI images.","messagePattern":"mise oci does not support \\[bootstrap\\.macos\\.\\*\\] defaults \\(found (.+?) default entries\\); macOS defaults do not apply to OCI images\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/cli/oci/common.rs","lineNumber":143,"sourceCode":"    // image either.\n    ToolsetBuilder::new()\n        .with_config_files(project_files)\n        .with_scope(ConfigScope::LocalOnly)\n        .build(config)\n        .await\n}\n\nfn reject_unsupported_system_defaults(config_files: &ConfigMap) -> Result<()> {\n    let mut defaults = 0usize;\n    for cf in config_files.values() {\n        let Some(system) = cf.bootstrap_config() else {\n            continue;\n        };\n        defaults += system::macos_defaults_entry_count(&system.macos);\n    }\n\n    if defaults > 0 {\n        bail!(\n            \"mise oci does not support [bootstrap.macos.*] defaults (found {defaults} default entries); \\\n             macOS defaults do not apply to OCI images.\"\n        );\n    }\n    Ok(())\n}\n\npub fn short_digest(d: &str) -> String {\n    let hex = d.trim_start_matches(\"sha256:\");\n    if hex.len() >= 12 {\n        format!(\"sha256:{}\", &hex[..12])\n    } else {\n        d.to_string()\n    }\n}\n\n#[cfg(test)]\nmod tests {","sourceCodeStart":125,"sourceCodeEnd":161,"githubUrl":"https://github.com/jdx/mise/blob/9dcfcaa0dc8747a2577d3270b69bb9d8313b2807/src/cli/oci/common.rs#L125-L161","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["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)","Delete the macos defaults if the project no longer needs them on macOS either","If using --include-global, clean macOS defaults from the global config or stop including global config for oci builds"],"exampleFix":"# before: mise.toml\n[bootstrap.macos]\ndefaults = { \"com.example.tool\" = { KeyType = \"value\" } }\n\n# after: mise.toml (macos defaults removed / moved to mise.local.toml)\n[tools]\nnode = \"22\"","handlingStrategy":"validation","validationCode":"#!/usr/bin/env bash\nif grep -rqE '^\\[bootstrap\\.macos' mise.toml mise.local.toml 2>/dev/null; then\n  echo \"[bootstrap.macos] present; oci builds reject macos defaults\" >&2; exit 2\nfi\nmise oci build","typeGuard":null,"tryCatchPattern":"mise oci build 2>err.log || { grep -q 'bootstrap.macos' err.log && echo \"move/delete [bootstrap.macos] entries from project config\" >&2; exit 2; }","preventionTips":["Keep platform bootstrap config in per-platform files (mise.local.toml) rather than shared mise.toml","Run a config lint step before oci builds that fails on [bootstrap.macos.*]"],"tags":["cli","oci","bootstrap-config","platform-mismatch","mise"],"backgroundTag":"unsupported-platform-config","analyzedSha":"9dcfcaa0dc8747a2577d3270b69bb9d8313b2807","analyzedAt":"2026-08-17T14:28:50.624Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}