{"record":{"id":"e089201a69a62f86","repo":"astrid-runtime/astrid","slug":"unsupported-windows-architecture-arch","errorCode":null,"errorMessage":"Unsupported Windows architecture: {arch}","messagePattern":"Unsupported Windows architecture: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/astrid-cli/src/commands/self_update/mod.rs","lineNumber":125,"sourceCode":"        \"musl\"\n    } else {\n        \"\"\n    }\n}\n\nfn platform_target_for(os: &str, arch: &str, target_env: &str) -> anyhow::Result<&'static str> {\n    match (os, arch, target_env) {\n        (\"macos\", \"aarch64\", _) => Ok(\"aarch64-apple-darwin\"),\n        (\"macos\", \"x86_64\", _) => Ok(\"x86_64-apple-darwin\"),\n        (\"linux\", \"x86_64\", \"musl\") => Ok(\"x86_64-unknown-linux-musl\"),\n        (\"linux\", \"aarch64\", \"musl\") => Ok(\"aarch64-unknown-linux-musl\"),\n        (\"linux\", \"x86_64\", \"gnu\") => Ok(\"x86_64-unknown-linux-gnu\"),\n        (\"linux\", \"aarch64\", \"gnu\") => Ok(\"aarch64-unknown-linux-gnu\"),\n        (\"linux\", \"x86_64\" | \"aarch64\", env) => {\n            bail!(\"Unsupported Linux target environment: {env}\")\n        },\n        (\"windows\", \"x86_64\", _) => Ok(\"x86_64-pc-windows-msvc\"),\n        (\"windows\", arch, _) => bail!(\"Unsupported Windows architecture: {arch}\"),\n        _ => bail!(\"Unsupported platform: {os}/{arch}\"),\n    }\n}\n\n/// Resolved path of the currently-running `astrid` binary (symlinks followed) —\n/// what self-update replaces in place.\nfn running_binary() -> anyhow::Result<PathBuf> {\n    let exe = std::env::current_exe().context(\"cannot determine current executable path\")?;\n    Ok(exe.canonicalize().unwrap_or(exe))\n}\n\n/// Whether `exe` is a Homebrew-managed binary. Homebrew symlinks `bin/astrid`\n/// into `…/Cellar/astrid/<version>/bin/astrid`, so the resolved path always\n/// contains a `Cellar` component. Such installs update via `brew upgrade`, not\n/// self-update — we must not shadow them with a second copy.\nfn is_homebrew_managed(exe: &Path) -> bool {\n    exe.components().any(|c| {\n        c.as_os_str()","sourceCodeStart":107,"sourceCodeEnd":143,"githubUrl":"https://github.com/astrid-runtime/astrid/blob/affd8760f44190dbdfbec23403f4c4b642c33112/crates/astrid-cli/src/commands/self_update/mod.rs#L107-L143","documentation":"`platform_target_for` supports only x86_64 on Windows (x86_64-pc-windows-msvc). Any other Windows architecture (e.g. aarch64) has no published artifact, so the update path bails with this message rather than downloading a binary that cannot run.","triggerScenarios":"`astrid self update` on Windows running on ARM64 (or any non-x86_64 arch), where the (\"windows\", arch, _) arm of the match is reached with arch != \"x86_64\".","commonSituations":"Windows on ARM (Surface Pro X, Snapdragon laptops) running the x64 CLI under emulation, then attempting self-update; CI matrix accidentally running the updater on an arm64 Windows runner.","solutions":["Download the x86_64-pc-windows-msvc build manually and keep running it under emulation; skip self-update.","Check `rustc -vV` to confirm the host arch.","Publish aarch64-pc-windows-msvc artifacts and add a match arm to enable native Windows ARM updates.","Pin the CLI version and update via package manager instead of self-update."],"exampleFix":"// before\n(\"windows\", arch, _) => bail!(\"Unsupported Windows architecture: {arch}\"),\n// after\n(\"windows\", \"aarch64\", _) => Ok(\"aarch64-pc-windows-msvc\"),\n(\"windows\", arch, _) => bail!(\"Unsupported Windows architecture: {arch}\"),","handlingStrategy":"fallback","validationCode":"if [ \"$(uname -s)\" = Windows_NT ] && [ \"$(uname -m)\" != x86_64 ]; then\n  echo \"self-update unsupported; install x86_64 build manually\"\nfi","typeGuard":"fn supported_windows_target(arch: &str) -> bool { arch == \"x86_64\" }","tryCatchPattern":"match platform_target() {\n    Ok(t) => download(t),\n    Err(e) if e.to_string().contains(\"Unsupported Windows architecture\") => {\n        eprintln!(\"run the x86_64-pc-windows-msvc build under emulation, or update via package manager\");\n    }\n    Err(e) => return Err(e),\n}","preventionTips":["On Windows ARM, prefer the package-manager install path over self-update.","Skip self-update in CI matrices that include arm64 Windows runners.","Publish aarch64-pc-windows-msvc artifacts to enable native support."],"tags":["platform","self-update","windows","architecture","rust"],"backgroundTag":"unsupported-platform","analyzedSha":"affd8760f44190dbdfbec23403f4c4b642c33112","analyzedAt":"2026-09-09T21:28:12.402Z","contentChangedAt":"2026-09-09T21:28:12.402Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}