{"record":{"id":"87c0e741db14219a","repo":"jdx/mise","slug":"not-set-up","errorCode":null,"errorMessage":"not set up","messagePattern":"not set up","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"info","filePath":"src/system/history/sync/onboard.rs","lineNumber":339,"sourceCode":"    request.dry_run = true;\n    // Pending decisions belong only to this preview store.\n    run::sync(&planning_store, &tracked, &request)?;\n    let mut preview = ApplyRequest::automatic();\n    preview.automatic = false;\n    preview.dry_run = true;\n    preview.plan_only = true;\n    apply::apply(&planning_store, &tracked, &preview).await?;\n    if onboarding.dry_run {\n        let preview_config = Some(preview_configuration(&planning_store)?);\n        miseprintln!(\"Dry run: nothing was changed.\");\n        return Ok(Outcome {\n            preview_config,\n            durable_access: true,\n            setup_held: false,\n        });\n    }\n    if !super::origin::confirmed(onboarding.yes, \"Set this machine up from the repository?\")? {\n        bail!(\"not set up\");\n    }\n\n    // Recompute after confirmation against current local files and remote\n    // refs; never apply a stale preview or restore over a watcher's new state.\n    refuse_other_connection(store, &onboarding.origin, &onboarding.branch)?;\n    let applied = if onboarding.replace_history {\n        let operation =\n            crate::system::history::scope::OperationScope::begin_replacement_apply().await?;\n        let _sync = run::lock(store)?;\n        let previous_status = run::read_status(state_dir)?;\n        let repo = store\n            .repo()\n            .ok_or_else(|| eyre::eyre!(\"setup requires git\"))?;\n        let previous_upstream = repo.ref_oid(UPSTREAM_REF)?;\n        let previous_sync_state = super::state::load(repo)?;\n        seed_confirmed_fetch_locked(store, &planning_store)?;\n        let replacement = detach_local_history(store)?;\n        if let Some(replacement) = &replacement {","sourceCodeStart":321,"sourceCodeEnd":357,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/system/history/sync/onboard.rs#L321-L357","documentation":"During interactive onboarding from git, mise asks the user to confirm 'Set this machine up from the repository?'. If the user declines (or a non-interactive call yields no confirmation), `run` aborts with the terse message 'not set up' instead of applying the repository's history.","triggerScenarios":"`mise dot` onboarding via from_git reaches the `confirmed()` prompt and the user answers no, or confirmation is not given in a non-interactive context.","commonSituations":"User mistakenly answers 'n' at the prompt; running onboarding inside a script where the prompt cannot be answered; a TTY-less CI run auto-declining the prompt.","solutions":["Re-run the onboarding command and answer yes at the confirmation prompt","Use the `--yes` flag (or equivalent) to pre-confirm the setup","Skip onboarding if the machine should not inherit repository history"],"exampleFix":"// before: non-interactive run auto-declines\nmise dot origin ...\n// after: pre-confirm\nmise dot origin ... --yes","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"match result {\n    Err(e) if e.to_string() == \"not set up\" => eprintln!(\"onboarding was declined; re-run and confirm\"),\n    Err(e) => return Err(e),\n    Ok(v) => v,\n}","preventionTips":["Run onboarding interactively so the confirmation prompt is answerable","Use the --yes flag in scripts and CI","Ensure stdin/stdout are a TTY when expecting prompts"],"tags":["git","sync","user-confirmation","abort"],"backgroundTag":"missing-required-flag","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"}