{"record":{"id":"9f204b04438334e3","repo":"jdx/mise","slug":"unknown-trigger-other-use-save-agent-or-upd","errorCode":null,"errorMessage":"unknown trigger {other:?}; use save, agent, or update","messagePattern":"unknown trigger (.+?); use save, agent, or update","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/cli/dotfiles/save.rs","lineNumber":70,"sourceCode":"        tracked: &crate::system::history::tracked::TrackedSet,\n        draft: Draft,\n    ) -> Result<()> {\n        match self.capture(store, tracked, draft) {\n            Ok(()) => Ok(()),\n            Err(err) if self.best_effort => {\n                warn!(\"history save: {err:#}\");\n                Ok(())\n            }\n            Err(err) => Err(err),\n        }\n    }\n\n    async fn save(self) -> Result<()> {\n        let trigger = match self.trigger.as_str() {\n            \"save\" => Trigger::Save,\n            \"agent\" => Trigger::Agent,\n            \"update\" => Trigger::Update,\n            other => bail!(\"unknown trigger {other:?}; use save, agent, or update\"),\n        };\n        if !crate::config::Settings::get().history.enabled {\n            bail!(\"history is disabled (history.enabled = false)\");\n        }\n        let (store, tracked, entries) = super::history::open().await?;\n        if !self.paths.is_empty() {\n            let walk = tracked.walk()?;\n            for path in &self.paths {\n                let path = normalize_target(path);\n                let captured = walk.files.keys().any(|file| file.starts_with(&path));\n                if !captured {\n                    // saving a deleted manual-save path saves the deletion,\n                    // provided the path was captured before (a path that\n                    // never existed is not a deletion)\n                    let deletion = tracked\n                        .entry_for(&path)\n                        .is_some_and(|entry| !entry.policy.autosave)\n                        && std::fs::symlink_metadata(&path)","sourceCodeStart":52,"sourceCodeEnd":88,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/cli/dotfiles/save.rs#L52-L88","documentation":"`mise dot save` validates its trigger positional argument against the exact strings save, agent, and update. Any other value is rejected before any history work happens. This prevents silently recording checkpoints with unrecognized provenance.","triggerScenarios":"Calling `mise dot save <trigger>` with any string other than save, agent, or update, e.g. `mise dot save manual`.","commonSituations":"Typos in scripted invocations; older scripts using a trigger name that was removed or renamed; users guessing at valid trigger names.","solutions":["Use one of: save, agent, or update","Check `mise dot save --help` for the accepted trigger values"],"exampleFix":"// before\nmise dot save manual\n// after\nmise dot save update","handlingStrategy":"validation","validationCode":"case \"$trigger\" in\n  save|agent|update) ;;\n  *) echo \"invalid trigger: $trigger\"; exit 2 ;;\nesac","typeGuard":null,"tryCatchPattern":"out=$(mise dot save \"$trigger\" 2>&1) || {\n  echo \"$out\"   # includes the accepted trigger names\n  exit 1\n}","preventionTips":["Only pass literal save, agent, or update","Check `mise dot save --help` when scripting","Avoid deriving trigger names from user input without whitelisting"],"tags":["cli","invalid-argument","dotfiles"],"backgroundTag":"invalid-enum-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"}