{"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/533346cc374382b41ec5ff70536252b2e96e725c/src/cli/self_update_stub.rs#L20-L56","documentation":"This is the stub implementation of SelfUpdate used when mise is compiled with self-update disabled (e.g. distro packages). run() unconditionally prints packaging instructions and bails because the binary cannot replace itself. It always reports is_available() == false.","triggerScenarios":"Running `mise self-update` on a build compiled without the self-update feature (common for Linux distro packages).","commonSituations":"Users of apt/dnf/arch-packaged mise attempting self-update; container images built from source without the feature flag.","solutions":["Update via the package manager that provided mise","Install the official mise build from mise.jdx.dev which supports self-update","Rebuild from source with the self-update feature enabled"],"exampleFix":"// before\nmise self-update  # disabled at build time\n// after\nsudo apt upgrade mise  # or install official build:\ncurl https://mise.run | sh","handlingStrategy":"fallback","validationCode":"mise self-update --help >/dev/null 2>&1 && echo available || echo use-package-manager","typeGuard":null,"tryCatchPattern":"mise self-update 2>/dev/null || echo 'self-update disabled; use package manager'","preventionTips":["Document per-environment how mise is updated (distro package vs official build)","Detect distro builds early in setup scripts"],"tags":["cli","self-update","build-flag"],"backgroundTag":"feature-not-enabled","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"}