jdx/mise · error

bootstrap users and groups are only supported on Linux

Error message

bootstrap users and groups are only supported on Linux

What it means

requests_from_config folds [bootstrap.groups] and [bootstrap.users] tables from all config layers; if the merged result is non-empty and the platform is not Linux (checked with cfg!(target_os = "linux")), it bails. Bootstrap account management is implemented on nix user/group database primitives that only exist on Linux, so macOS/Windows configs with these tables are rejected before any plan is computed (a non-Linux stub module backs the same public API).

Source

Thrown at src/system/accounts.rs:180

pub fn requests_from_config(config: &Config) -> Result<AccountRequests> {
    let mut groups = IndexMap::new();
    let mut users = IndexMap::new();
    for cf in config.config_files.values() {
        if let Some(bootstrap) = cf.bootstrap_config() {
            for (name, group) in bootstrap.groups {
                groups.entry(name).or_insert(group);
            }
            for (name, user) in bootstrap.users {
                users.entry(name).or_insert(user);
            }
        }
    }
    if groups.is_empty() && users.is_empty() {
        return Ok(AccountRequests::default());
    }
    if !cfg!(target_os = "linux") {
        bail!("bootstrap users and groups are only supported on Linux");
    }
    let groups = groups
        .into_iter()
        .map(|(name, config)| GroupRequest::from_toml(name, config))
        .collect::<Result<Vec<_>>>()?;
    let users = users
        .into_iter()
        .map(|(name, config)| UserRequest::from_toml(name, config))
        .collect::<Result<Vec<_>>>()?;
    validate_requests(&groups, &users)?;
    Ok(AccountRequests { groups, users })
}

pub fn prepare_requests_from_config(config: &Config) -> Result<AccountRequests> {
    requests_from_config(config)
}

impl GroupRequest {

View on GitHub (pinned to 9dcfcaa0dc)

Solutions

  1. Move Linux account bootstrap into a Linux-only config file (e.g. mise.linux.toml or a per-host config layer) so macOS runs never load these tables.
  2. Remove the [bootstrap.users]/[bootstrap.groups] sections on non-Linux machines.
  3. On macOS/Windows, provision accounts with the native tooling (dscl, useradd alternatives) instead of mise bootstrap.

Example fix

# before: mise.toml (shared, fails on macOS)
[bootstrap.users.deploy]
state = "present"
group = "deploy"
# after: mise.linux.toml — only loaded on Linux
[bootstrap.users.deploy]
state = "present"
group = "deploy"
Defensive patterns

Strategy: validation

Validate before calling

#!/usr/bin/env bash
if [ "$(uname -s)" != "Linux" ] && grep -rq '^\[bootstrap\.\(users\|groups\)' mise.toml mise.*.toml 2>/dev/null; then
  echo 'error: bootstrap users/groups tables are Linux-only' >&2; exit 1
fi
mise bootstrap "$@"

Prevention

When it happens

Trigger: Running `mise bootstrap ...` (or anything that loads account requests, e.g. plan/apply) with a mise.toml containing [bootstrap.users.<name>] or [bootstrap.groups.<name>] on macOS or Windows. Any config layer (project, local, global) contributing a non-empty users/groups map triggers it.

Common situations: Sharing one mise.toml across a mixed macOS/Linux team; macOS developers pulling a Linux server's bootstrap config; porting dotfiles that include bootstrap sections without platform gating.

Related errors


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