{"record":{"id":"d7b448768b96db6e","repo":"jdx/mise","slug":"bootstrap-users-and-groups-are-only-supported-on-l","errorCode":null,"errorMessage":"bootstrap users and groups are only supported on Linux","messagePattern":"bootstrap users and groups are only supported on Linux","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/system/accounts.rs","lineNumber":180,"sourceCode":"\npub(crate) fn requests_from_config(config: &Config) -> Result<AccountRequests> {\n    let mut groups = IndexMap::new();\n    let mut users = IndexMap::new();\n    for cf in config.config_files.values() {\n        if let Some(bootstrap) = cf.bootstrap_config() {\n            for (name, group) in bootstrap.groups {\n                groups.entry(name).or_insert(group);\n            }\n            for (name, user) in bootstrap.users {\n                users.entry(name).or_insert(user);\n            }\n        }\n    }\n    if groups.is_empty() && users.is_empty() {\n        return Ok(AccountRequests::default());\n    }\n    if !cfg!(target_os = \"linux\") {\n        bail!(\"bootstrap users and groups are only supported on Linux\");\n    }\n    let groups = groups\n        .into_iter()\n        .map(|(name, config)| GroupRequest::from_toml(name, config))\n        .collect::<Result<Vec<_>>>()?;\n    let users = users\n        .into_iter()\n        .map(|(name, config)| UserRequest::from_toml(name, config))\n        .collect::<Result<Vec<_>>>()?;\n    validate_requests(&groups, &users)?;\n    Ok(AccountRequests { groups, users })\n}\n\npub(crate) fn prepare_requests_from_config(config: &Config) -> Result<AccountRequests> {\n    requests_from_config(config)\n}\n\nimpl GroupRequest {","sourceCodeStart":162,"sourceCodeEnd":198,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/system/accounts.rs#L162-L198","documentation":"mise's bootstrap account provisioning (users and groups defined in [bootstrap] config) is implemented with nix and Linux account APIs, so it only supports Linux. The code checks cfg!(target_os = \"linux\") before processing any configured accounts and bails with this error on any other platform (macOS, Windows, BSDs). It is a hard guard, not a fallback: configuration is parsed first, then rejected at runtime if accounts are requested.","triggerScenarios":"Running mise on a non-Linux OS (macOS/Windows) with a mise.toml that defines any bootstrap users or groups; CI/devcontainer images on non-Linux runners that share a config with Linux hosts; macOS users who copy a colleague's config containing [bootstrap.groups]/[bootstrap.users].","commonSituations":"Teams with mixed macOS/Linux workstations sharing one repo-level mise.toml; Windows developers pulling a config authored for Linux containers; switching OSes and forgetting that bootstrap config is platform-specific.","solutions":["Remove the [bootstrap.groups] and [bootstrap.users] sections from your mise.toml on non-Linux machines (e.g. keep them only in a Linux-specific environment config file)","Guard the account config with an os-specific condition or move it to a config file loaded only on Linux hosts","Provision the users/groups outside mise (systemd-sysusers, Ansible, Dockerfile USER/groupadd) and drop the bootstrap section","Run the task on a Linux host/container instead"],"exampleFix":"# before (mise.toml, fails on macOS)\n[bootstrap.groups]\napp = { gid = 1500 }\n[bootstrap.users]\napp = { group = \"app\", system = true }\n\n# after (moved to a Linux-only config, e.g. mise.linux.toml, or removed on macOS)","handlingStrategy":"validation","validationCode":"# shell check before committing a shared config\nif [ \"$(uname -s)\" != \"Linux\" ] && grep -q '^\\[bootstrap\\.' mise.toml; then\n  echo \"bootstrap accounts are Linux-only; use a Linux-specific config\" >&2\nfi","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep [bootstrap.*] sections in Linux-only config files (mise.linux.toml or environment-scoped configs)","Never merge bootstrap account config into a repo-wide mise.toml used by macOS/Windows hosts","Provision accounts with platform-neutral tooling (Ansible, Dockerfiles) when the fleet is mixed OS","Document the Linux-only constraint in the repo where the config lives"],"tags":["linux","platform-support","bootstrap","config"],"backgroundTag":"unsupported-platform","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"}