{"record":{"id":"9c0ba55b894b3cbd","repo":"jdx/mise","slug":"mise-s-self-update-feature-has-been-disabled-at-bu","errorCode":null,"errorMessage":"mise's self-update feature has been disabled at build time, cannot update","messagePattern":"mise's self-update feature has been disabled at build time, cannot update","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/cli/self_update_stub.rs","lineNumber":38,"sourceCode":"    /// Update even if already up to date\n    #[usage(long, short)]\n    force: bool,\n\n    /// Skip confirmation prompt\n    #[usage(long, short)]\n    yes: bool,\n\n    /// Disable auto-updating plugins\n    #[usage(long)]\n    no_plugins: bool,\n}\n\nimpl SelfUpdate {\n    pub(crate) async fn run(self) -> crate::Result<()> {\n        if let Some(instructions) = upgrade_instructions_text() {\n            warn!(\"{}\", instructions);\n        }\n        eyre::bail!(\"mise's self-update feature has been disabled at build time, cannot update\");\n    }\n    pub(crate) fn is_available() -> bool {\n        false\n    }\n}\n\n#[derive(Debug, Default, serde::Deserialize)]\nstruct InstructionsToml {\n    message: Option<String>,\n    #[serde(flatten)]\n    commands: BTreeMap<String, String>,\n}\n\nfn read_instructions_file(path: &PathBuf) -> Option<String> {\n    let body = fs::read_to_string(path).ok()?;\n    let parsed: InstructionsToml = toml::from_str(&body).ok()?;\n    if let Some(msg) = parsed.message {\n        return Some(msg);","sourceCodeStart":20,"sourceCodeEnd":56,"githubUrl":"https://github.com/jdx/mise/blob/afd2eddd3a50c16190efc1c7e94404b48f72af57/src/cli/self_update_stub.rs#L20-L56","documentation":"When mise is compiled without self-update support (`self_update` feature disabled — typical for distro/package-manager builds), the stubbed `SelfUpdate::run` always fails with this error after optionally printing package-manager upgrade instructions. There is no way to self-update such a binary.","triggerScenarios":"Running `mise self-update` on a build compiled without the self-update feature (most Linux distro packages, some brew formulas and CI-packaged builds). Always triggered regardless of arguments (except that `--force` does not exist on the stub path).","commonSituations":"Users of distro-packaged mise trying `mise self-update`; switching from a package-manager install and expecting self-update to work; scripts that unconditionally call self-update.","solutions":["Update via your package manager (apt/dnf/brew/etc.) — the printed instructions tell you which","Reinstall mise via the official installer (https://mise.run) or cargo with the self_update feature to get a self-updatable binary","Guard automation: check `mise self-update --help` availability or the install source before calling self-update in scripts"],"exampleFix":"// before\nmise self-update  # disabled at build time\n// after (debian/ubuntu)\nsudo apt update && sudo apt install --only-upgrade mise","handlingStrategy":"fallback","validationCode":"const help = child_process.execSync('mise self-update --help 2>&1 || true').toString();\nconst selfUpdateCapable = !help.includes('disabled at build time');\nif (!selfUpdateCapable) console.log('Use the package manager upgrade path instead');","typeGuard":null,"tryCatchPattern":"try {\n  await $`mise self-update`;\n} catch (e) {\n  if (String(e).includes('disabled at build time')) {\n    await $`sudo apt-get install --only-upgrade mise`; // per install source\n  } else throw e;\n}","preventionTips":["Know your install channel: distro builds disable self-update by design","In scripts, detect stub builds before calling self-update","Standardize on the official installer where self-update is required"],"tags":["cli","self-update","build-feature"],"backgroundTag":"feature-not-enabled","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"}