jdx/mise · error

bootstrap user ' ' must be an absolute path

Error message

bootstrap user '{name}' {field} must be an absolute path

What it means

validate_account_path requires bootstrap user path fields (home, and any other path-typed field) to be absolute. Relative paths cannot be safely resolved at the system-account level (they depend on the invoking process CWD), so mise rejects them during validation.

Solutions

  1. Prefix the path with '/' (or the appropriate absolute mount point).
  2. Use a template/variable that expands to an absolute path if the base differs per host.
  3. Re-run `mise bootstrap plan` to confirm the corrected path validates.

Example fix

// before
[[bootstrap.users]]
name = "alice"
home = "users/alice"

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

Strategy: validation

Validate before calling

function validateAbsolutePath(user, field) {
  const p = user[field];
  if (typeof p === 'string' && !p.startsWith('/')) {
    throw new Error(`user '${user.name}': ${field} must be an absolute path`);
  }
}

Type guard

function isAbsolutePath(p) {
  return typeof p === 'string' && p.startsWith('/');
}

Try / catch

try {
  await mise.bootstrap.apply(config);
} catch (e) {
  if (String(e).includes('must be an absolute path')) {
    console.error('Prefix the path with /:', e.message);
  } else throw e;
}

Prevention

When it happens

Trigger: Setting home (or another validated path field) on a bootstrap user to a relative value like "users/alice" or "./home".

Common situations: Authoring configs assuming a base directory is prepended; copy-pasting paths from app-level configs that resolve relative to a project root; typos dropping the leading '/'.

Understand the failure class

Background: "Must be a positive integer", "Invalid value", "Unsupported": the invalid-argument-value error family, when a library rejects the value you pass — this error's family across 35 libraries.

Related errors


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

Appendix: source

Thrown at src/system/accounts.rs:727

            .next()
            .is_some_and(|character| character == '_' || character.is_ascii_alphabetic())
        && characters.all(|character| {
            character == '_'
                || character == '-'
                || character.is_ascii_digit()
                || character.is_ascii_alphabetic()
        });
    if !valid {
        bail!(
            "invalid bootstrap {kind} name '{name}': use at most 32 ASCII letters, digits, '_' or '-', with an optional trailing '$'"
        );
    }
    Ok(())
}

fn validate_account_path(name: &str, field: &str, path: &std::path::Path) -> Result<()> {
    if !path.is_absolute() {
        bail!("bootstrap user '{name}' {field} must be an absolute path");
    }
    if path
        .to_string_lossy()
        .chars()
        .any(|character| character == ':' || character == '\n' || character == '\r')
    {
        bail!("bootstrap user '{name}' {field} must not contain ':', CR, or LF");
    }
    Ok(())
}

pub(crate) fn plans(requests: &AccountRequests) -> Vec<ResourcePlan> {
    requests
        .groups
        .iter()
        .map(GroupRequest::plan)
        .chain(requests.users.iter().map(UserRequest::plan))
        .collect()

View on GitHub (pinned to 533346cc37)