jdx/mise · error

bootstrap user ' ' sets move_home without home

Error message

bootstrap user '{name}' sets move_home without home

What it means

move_home renames/moves a user's home directory, which requires knowing the current (or target) home path from the home field. If home is unset, move_home=true has no path to operate on, so mise rejects the combination during validation.

Solutions

  1. Set home to the current absolute home path of the user.
  2. Remove move_home if you are not relocating the home directory.
  3. Verify with `mise bootstrap plan` that the intended move is planned.

Example fix

// before
[[bootstrap.users]]
name = "alice"
move_home = true

// after
[[bootstrap.users]]
name = "alice"
home = "/home/alice"
move_home = true
Defensive patterns

Strategy: validation

Validate before calling

function validateMoveHome(user) {
  if (user.move_home && !user.home) {
    throw new Error(`user '${user.name}': move_home requires home`);
  }
}

Type guard

function canMoveHome(user) {
  return !user.move_home || (typeof user.home === 'string' && user.home.startsWith('/'));
}

Try / catch

try {
  await mise.bootstrap.apply(config);
} catch (e) {
  if (String(e).includes('move_home without home')) {
    console.error('Set home for the user or remove move_home:', e.message);
  } else throw e;
}

Prevention

When it happens

Trigger: Setting move_home = true on a bootstrap user entry without specifying home.

Common situations: Migrating a user's home directory (e.g. /home/alice to /srv/home/alice) but defining only move_home; copying the move_home flag from another user entry without the accompanying home path.

Understand the failure class

Background: "is required", "must be set", "missing required field": configuration validation errors across open-source libraries — this error's family across 36 libraries.

Related errors


AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17). Data as JSON: /api/errors/5e1708404d074e6e. Report an issue: GitHub.

Appendix: source

Thrown at src/system/accounts.rs:356

        if config.state == AccountState::Absent
            && (config.uid.is_some()
                || config.group.is_some()
                || config.groups.is_some()
                || config.exclusive_groups
                || config.home.is_some()
                || config.shell.is_some()
                || config.comment.is_some()
                || config.system
                || config.create_home.is_some()
                || config.move_home)
        {
            bail!("absent bootstrap user '{name}' may only set state and remove_home");
        }
        if config.exclusive_groups && config.groups.is_none() {
            bail!("bootstrap user '{name}' sets exclusive_groups without groups");
        }
        if config.move_home && config.home.is_none() {
            bail!("bootstrap user '{name}' sets move_home without home");
        }
        if let Some(group) = &config.group {
            validate_name("group", group)?;
        }
        if let Some(path) = &config.home {
            validate_account_path(&name, "home", path)?;
        }
        if let Some(path) = &config.shell {
            validate_account_path(&name, "shell", path)?;
        }
        if config
            .comment
            .as_ref()
            .is_some_and(|comment| comment.contains([':', '\n', '\r']))
        {
            bail!("bootstrap user '{name}' comment must not contain ':', CR, or LF");
        }
        let mut groups = config

View on GitHub (pinned to 533346cc37)