{"record":{"id":"5e1708404d074e6e","repo":"jdx/mise","slug":"bootstrap-user-name-sets-move-home-without-hom","errorCode":null,"errorMessage":"bootstrap user '{name}' sets move_home without home","messagePattern":"bootstrap user '(.+?)' sets move_home without home","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/system/accounts.rs","lineNumber":356,"sourceCode":"        if config.state == AccountState::Absent\n            && (config.uid.is_some()\n                || config.group.is_some()\n                || config.groups.is_some()\n                || config.exclusive_groups\n                || config.home.is_some()\n                || config.shell.is_some()\n                || config.comment.is_some()\n                || config.system\n                || config.create_home.is_some()\n                || config.move_home)\n        {\n            bail!(\"absent bootstrap user '{name}' may only set state and remove_home\");\n        }\n        if config.exclusive_groups && config.groups.is_none() {\n            bail!(\"bootstrap user '{name}' sets exclusive_groups without groups\");\n        }\n        if config.move_home && config.home.is_none() {\n            bail!(\"bootstrap user '{name}' sets move_home without home\");\n        }\n        if let Some(group) = &config.group {\n            validate_name(\"group\", group)?;\n        }\n        if let Some(path) = &config.home {\n            validate_account_path(&name, \"home\", path)?;\n        }\n        if let Some(path) = &config.shell {\n            validate_account_path(&name, \"shell\", path)?;\n        }\n        if config\n            .comment\n            .as_ref()\n            .is_some_and(|comment| comment.contains([':', '\\n', '\\r']))\n        {\n            bail!(\"bootstrap user '{name}' comment must not contain ':', CR, or LF\");\n        }\n        let mut groups = config","sourceCodeStart":338,"sourceCodeEnd":374,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/system/accounts.rs#L338-L374","documentation":"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.","triggerScenarios":"Setting move_home = true on a bootstrap user entry without specifying home.","commonSituations":"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.","solutions":["Set home to the current absolute home path of the user.","Remove move_home if you are not relocating the home directory.","Verify with `mise bootstrap plan` that the intended move is planned."],"exampleFix":"// before\n[[bootstrap.users]]\nname = \"alice\"\nmove_home = true\n\n// after\n[[bootstrap.users]]\nname = \"alice\"\nhome = \"/home/alice\"\nmove_home = true","handlingStrategy":"validation","validationCode":"function validateMoveHome(user) {\n  if (user.move_home && !user.home) {\n    throw new Error(`user '${user.name}': move_home requires home`);\n  }\n}","typeGuard":"function canMoveHome(user) {\n  return !user.move_home || (typeof user.home === 'string' && user.home.startsWith('/'));\n}","tryCatchPattern":"try {\n  await mise.bootstrap.apply(config);\n} catch (e) {\n  if (String(e).includes('move_home without home')) {\n    console.error('Set home for the user or remove move_home:', e.message);\n  } else throw e;\n}","preventionTips":["Set home before enabling move_home.","Only use move_home for actual relocations; verify the current path with `getent passwd`.","Dry-run with `mise bootstrap plan` before applying."],"tags":["bootstrap","home-directory","config-validation"],"backgroundTag":"missing-required-config-field","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"}