{"record":{"id":"c4c8e9132fcd78bd","repo":"jdx/mise","slug":"unknown-history-sync-mode-other-use-sync-fet","errorCode":null,"errorMessage":"unknown history.sync mode {other:?}; use sync, fetch-only, or manual","messagePattern":"unknown history\\.sync mode (.+?); use sync, fetch-only, or manual","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/system/history/sync/mod.rs","lineNumber":57,"sourceCode":"    /// No automatic network activity: `sync` and `pull` on request only.\n    Manual,\n}\n\n/// What a mode does in the background.\n#[derive(Clone, Copy, Debug, PartialEq, Eq)]\npub(crate) struct Automatic {\n    pub publish: bool,\n    pub fetch: bool,\n    pub apply: bool,\n}\n\nimpl SyncMode {\n    pub(crate) fn parse(value: &str) -> Result<Self> {\n        match value {\n            \"sync\" => Ok(Self::Sync),\n            \"fetch-only\" => Ok(Self::FetchOnly),\n            \"manual\" => Ok(Self::Manual),\n            other => bail!(\"unknown history.sync mode {other:?}; use sync, fetch-only, or manual\"),\n        }\n    }\n\n    pub(crate) fn current() -> Result<Self> {\n        Self::parse(&crate::config::Settings::get().history.sync)\n    }\n\n    pub(crate) fn as_str(self) -> &'static str {\n        match self {\n            Self::Sync => \"sync\",\n            Self::FetchOnly => \"fetch-only\",\n            Self::Manual => \"manual\",\n        }\n    }\n\n    pub(crate) fn publishes(self) -> bool {\n        self != Self::FetchOnly\n    }","sourceCodeStart":39,"sourceCodeEnd":75,"githubUrl":"https://github.com/jdx/mise/blob/afd2eddd3a50c16190efc1c7e94404b48f72af57/src/system/history/sync/mod.rs#L39-L75","documentation":"`SyncMode::parse` in src/system/history/sync/mod.rs validates the `settings.history.sync` value against exactly three accepted strings: `sync`, `fetch-only`, and `manual`. Any other value is rejected with this error listing the valid options. The mode controls what the background watcher does automatically: `sync` publishes/fetches/applies, `fetch-only` never publishes, and `manual` performs no automatic network activity.","triggerScenarios":"Calling `SyncMode::parse(value)` or `SyncMode::current()` (which parses `Settings::get().history.sync`) with a string other than \"sync\", \"fetch-only\", or \"manual\" — e.g. a misspelled or wrongly-cased mode like \"Sync\", \"fetch_only\", or \"auto\" in settings.","commonSituations":"Typo in mise settings (`mise settings set history.sync fetchonly` instead of `fetch-only`); copying a mode name from another tool; using an underscore instead of a hyphen; a stale settings file from an older version with a now-removed mode value.","solutions":["Set `history.sync` to one of the exact accepted values: `sync`, `fetch-only`, or `manual` (e.g. `mise settings set history.sync fetch-only`).","Fix the value in your settings file/config (check spelling, hyphens, and lowercase).","Run `mise settings` or consult the history.sync docs to confirm the allowed enum values for your mise version."],"exampleFix":"// before (settings)\nhistory.sync = \"FetchOnly\"\n\n// after\nhistory.sync = \"fetch-only\"","handlingStrategy":"validation","validationCode":"const VALID_MODES: [&str; 3] = [\"sync\", \"fetch-only\", \"manual\"];\nfn validate_sync_mode(v: &str) -> bool {\n    VALID_MODES.contains(&v)\n}","typeGuard":null,"tryCatchPattern":"// Rust\nmatch SyncMode::parse(&value) {\n    Ok(mode) => use(mode),\n    Err(e) => eprintln!(\"{} — set history.sync to sync | fetch-only | manual\", e),\n}","preventionTips":["Copy mode values exactly: `sync`, `fetch-only` (hyphen, lowercase), `manual`","Use `mise settings edit` or schema-validated config so invalid enum values are caught at edit time","After changing the mode, run a command that reads settings (e.g. `mise settings get history.sync`) to confirm it parses"],"tags":["config","enum","validation","settings"],"backgroundTag":"invalid-enum-value","analyzedSha":"afd2eddd3a50c16190efc1c7e94404b48f72af57","analyzedAt":"2026-09-09T01:38:25.179Z","contentChangedAt":"2026-09-09T01:38:25.179Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}