{"record":{"id":"7f1838041f84e1e0","repo":"wasmerio/wasmer","slug":"self-update-is-not-supported-on-windows-use-insta","errorCode":null,"errorMessage":"Self update is not supported on Windows. Use install instructions on the Wasmer homepage: https://wasmer.io","messagePattern":"Self update is not supported on Windows\\. Use install instructions on the Wasmer homepage: https://wasmer\\.io","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"lib/cli/src/commands/self_update.rs","lineNumber":35,"sourceCode":"        println!(\"Fetching latest installer\");\n        let cmd = Command::new(\"curl\")\n            .arg(\"https://get.wasmer.io\")\n            .arg(\"-sSfL\")\n            .stdout(Stdio::piped())\n            .spawn()?;\n\n        let mut process = Command::new(\"sh\")\n            .stdin(cmd.stdout.unwrap())\n            .stdout(Stdio::inherit())\n            .spawn()?;\n\n        process.wait().unwrap();\n        Ok(())\n    }\n\n    #[cfg(target_os = \"windows\")]\n    fn inner_execute(&self) -> Result<(), anyhow::Error> {\n        anyhow::bail!(\n            \"Self update is not supported on Windows. Use install instructions on the Wasmer homepage: https://wasmer.io\"\n        );\n    }\n}\n","sourceCodeStart":17,"sourceCodeEnd":40,"githubUrl":"https://github.com/wasmerio/wasmer/blob/8c4b9ee9d33fb2068863fbb3d328683e7e6ff7f5/lib/cli/src/commands/self_update.rs#L17-L40","documentation":"The `wasmer self-update` command refuses to run on Windows. Self-updating via binary replacement is only implemented for Unix-like targets, so the Windows-specific `inner_execute` unconditionally aborts with `anyhow::bail!` and points users to the official install instructions at https://wasmer.io. It is a deliberate platform limitation, not a runtime failure.","triggerScenarios":"Running `wasmer self-update` (SelfUpdate::execute -> inner_execute) on any Windows build of the CLI. The #[cfg(target_os = \"windows\")] variant always bails; no other condition matters.","commonSituations":"Windows users installing Wasmer via scoop/winget/installer and later trying to upgrade in place with the CLI; CI scripts written for Linux/macOS that unconditionally run `wasmer self-update`.","solutions":["Upgrade via the Windows installer from https://wasmer.io instead of `wasmer self-update`","Use the package manager that installed it (e.g. `winget upgrade Wasmer.Wasmer` or `scoop update wasmer`)","Guard automation scripts: only call `wasmer self-update` when cfg!(target_os = \"windows\") is false"],"exampleFix":"// before (CI script)\nwasmer self-update || exit 1\n// after (shell)\nif ! uname -s | grep -qi mingw; then wasmer self-update; fi","handlingStrategy":"validation","validationCode":"if cfg!(target_os = \"windows\") {\n    eprintln!(\"self-update unsupported on Windows; install from https://wasmer.io\");\n    return;\n}\nwasmer_cli::commands::self_update::SelfUpdate::new().execute()?;","typeGuard":"fn can_self_update() -> bool {\n    !cfg!(target_os = \"windows\")\n}","tryCatchPattern":null,"preventionTips":["Branch upgrade logic on OS before invoking self-update","On Windows use winget/scoop or the installer for upgrades","Pin CLI versions in CI and update them via package management, not self-update"],"tags":["windows","self-update","platform-unsupported","cli"],"backgroundTag":"unsupported-platform","analyzedSha":"8c4b9ee9d33fb2068863fbb3d328683e7e6ff7f5","analyzedAt":"2026-09-01T23:06:31.009Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-09T06:17:21.866Z"}