{"record":{"id":"233da9ab9e1baa1a","repo":"jdx/mise","slug":"declined-nothing-was-changed","errorCode":null,"errorMessage":"declined; nothing was changed","messagePattern":"declined; nothing was changed","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"info","filePath":"src/system/history/replay.rs","lineNumber":505,"sourceCode":"    let mut live;\n    loop {\n        round += 1;\n        // editors may have written while the prompt was open: re-plan\n        live = live_tree(repo, tracked)?;\n        let fresh = plan(repo, exec, &live)?;\n        let changed = actionable(&fresh) != actionable(steps);\n        if changed {\n            *steps = fresh.clone();\n            miseprintln!(\"history: the working tree changed since the plan was shown:\");\n            print_plan(steps, exec, tracked)?;\n            if steps\n                .iter()\n                .any(|step| matches!(step.action, Action::Conflict(_)))\n            {\n                bail!(\"the refreshed plan has conflicts; nothing was changed\");\n            }\n            if !exec.yes && !prompt::confirm(\"history: apply the refreshed plan?\")?.is_yes() {\n                bail!(\"declined; nothing was changed\");\n            }\n        }\n        // completeness: every path about to be written or deleted that exists\n        // now must be captured, as it is now, in the protective checkpoint\n        let Some((before_id, _)) = scope.before() else {\n            bail!(\"no protective checkpoint could be taken; nothing was changed\");\n        };\n        let before = store::entry(store, before_id)?;\n        let before_tree = before\n            .checkpoint\n            .tree\n            .snapshot\n            .clone()\n            .ok_or_else(|| eyre::eyre!(\"the protective checkpoint has no content\"))?;\n        let mut missing = vec![];\n        for step in steps.iter().filter(|step| step.action.mutates()) {\n            let Some(current) = repo.restored_object_at(&live, &step.tree_path)? else {\n                continue;","sourceCodeStart":487,"sourceCodeEnd":523,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/system/history/replay.rs#L487-L523","documentation":"`mise history` (rollback/undo/apply) refreshes its plan before writing anything, and if the refreshed plan still contains unresolved conflicts it asks for confirmation. This error is thrown when the user (or a non-interactive caller answering 'no') declines that confirmation. It is a deliberate no-op guard: nothing on disk was touched.","triggerScenarios":"Running `mise history rollback`/`undo`/`apply` without `--yes` when the refreshed plan contains Action::Conflict steps; `prompt::confirm` returned a non-yes answer inside apply_steps.","commonSituations":"Non-interactive CI/script runs where confirm() cannot get a yes; a user reviewing the refreshed plan and choosing not to proceed because live files differ from the original plan.","solutions":["Re-run with `--yes` if you intend to apply the plan non-interactively.","Inspect the printed plan first; resolve conflicts (e.g. revert or manually restore the conflicting paths) so the refreshed plan is conflict-free.","Run the command interactively and answer `y` when the plan looks correct."],"exampleFix":"// before\nmise history rollback\n// error: declined; nothing was changed\n// after\nmise history rollback --yes","handlingStrategy":"validation","validationCode":"if !has_conflicts(plan) { run_rollback_with_yes(); } else { review_plan_and_resolve(plan); }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Prefer `--yes` in scripts only after confirming the plan is conflict-free.","Review the refreshed plan output before answering the confirmation.","Resolve conflicting paths up front so no confirmation prompt appears."],"tags":["history","confirmation","no-op","cli"],"backgroundTag":"operation-aborted-by-user","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"}