{"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(super) 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/533346cc374382b41ec5ff70536252b2e96e725c/src/cli/oci/common.rs#L125-L161","documentation":"`mise oci build` rejects configs that define [bootstrap.macos.*] default entries, because macOS-specific bootstrap defaults cannot be applied when building a Linux OCI image. The check counts macOS default entries across all bootstrap systems and bails if any are found.","triggerScenarios":"Running `mise oci build` while the active bootstrap configuration contains one or more [bootstrap.macos.*] default entries (e.g. [bootstrap.macos.aarch64] defaults), via reject_unsupported_system_defaults.","commonSituations":"Reusing a bootstrap.toml shared between native macOS mise bootstraps and OCI image builds, or copying a colleague's macOS bootstrap config into an OCI project.","solutions":["Remove the [bootstrap.macos.*] sections from the bootstrap config used for the OCI build","Keep macOS defaults in a separate config not passed to mise oci build","Use [bootstrap.linux.*] defaults instead, which apply to OCI images"],"exampleFix":"# before\n[bootstrap.macos.aarch64.default]\nxx = \"yy\"\n\n# after\n[bootstrap.linux.x86_64.default]\nxx = \"yy\"","handlingStrategy":"validation","validationCode":"grep -q 'bootstrap.macos' bootstrap.toml && echo 'macOS defaults not supported for oci build' || mise oci build","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Split macOS-specific bootstrap defaults into a config not used for OCI builds","Review bootstrap.toml when sharing configs between macOS hosts and OCI builds","Use [bootstrap.linux.*] entries for image builds"],"tags":["oci","config","macos","unsupported"],"backgroundTag":"unsupported-config-value","analyzedSha":"533346cc374382b41ec5ff70536252b2e96e725c","analyzedAt":"2026-09-17T13:35:38.149Z","contentChangedAt":"2026-09-17T13:35:38.149Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}