{"record":{"id":"dbf45776ff1375d7","repo":"jdx/mise","slug":"bootstrap-user-name-field-must-be-an-absolut","errorCode":null,"errorMessage":"bootstrap user '{name}' {field} must be an absolute path","messagePattern":"bootstrap user '(.+?)' (.+?) must be an absolute path","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/system/accounts.rs","lineNumber":727,"sourceCode":"            .next()\n            .is_some_and(|character| character == '_' || character.is_ascii_alphabetic())\n        && characters.all(|character| {\n            character == '_'\n                || character == '-'\n                || character.is_ascii_digit()\n                || character.is_ascii_alphabetic()\n        });\n    if !valid {\n        bail!(\n            \"invalid bootstrap {kind} name '{name}': use at most 32 ASCII letters, digits, '_' or '-', with an optional trailing '$'\"\n        );\n    }\n    Ok(())\n}\n\nfn validate_account_path(name: &str, field: &str, path: &std::path::Path) -> Result<()> {\n    if !path.is_absolute() {\n        bail!(\"bootstrap user '{name}' {field} must be an absolute path\");\n    }\n    if path\n        .to_string_lossy()\n        .chars()\n        .any(|character| character == ':' || character == '\\n' || character == '\\r')\n    {\n        bail!(\"bootstrap user '{name}' {field} must not contain ':', CR, or LF\");\n    }\n    Ok(())\n}\n\npub(crate) fn plans(requests: &AccountRequests) -> Vec<ResourcePlan> {\n    requests\n        .groups\n        .iter()\n        .map(GroupRequest::plan)\n        .chain(requests.users.iter().map(UserRequest::plan))\n        .collect()","sourceCodeStart":709,"sourceCodeEnd":745,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/system/accounts.rs#L709-L745","documentation":"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.","triggerScenarios":"Setting home (or another validated path field) on a bootstrap user to a relative value like \"users/alice\" or \"./home\".","commonSituations":"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 '/'.","solutions":["Prefix the path with '/' (or the appropriate absolute mount point).","Use a template/variable that expands to an absolute path if the base differs per host.","Re-run `mise bootstrap plan` to confirm the corrected path validates."],"exampleFix":"// before\n[[bootstrap.users]]\nname = \"alice\"\nhome = \"users/alice\"\n\n// after\n[[bootstrap.users]]\nname = \"alice\"\nhome = \"/home/alice\"","handlingStrategy":"validation","validationCode":"function validateAbsolutePath(user, field) {\n  const p = user[field];\n  if (typeof p === 'string' && !p.startsWith('/')) {\n    throw new Error(`user '${user.name}': ${field} must be an absolute path`);\n  }\n}","typeGuard":"function isAbsolutePath(p) {\n  return typeof p === 'string' && p.startsWith('/');\n}","tryCatchPattern":"try {\n  await mise.bootstrap.apply(config);\n} catch (e) {\n  if (String(e).includes('must be an absolute path')) {\n    console.error('Prefix the path with /:', e.message);\n  } else throw e;\n}","preventionTips":["Always write account paths as absolute POSIX paths.","Resolve templated paths against an explicit base directory.","Lint configs for relative paths before applying."],"tags":["bootstrap","paths","input-validation"],"backgroundTag":"invalid-argument-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"}