Commit c1d1765
committed
Fix Windows arch detection in install_cargo_binstall
archive_for_platform derived the Windows archive name from `uname -m`,
but Git for Windows' MSYS runtime does not report the host's real
architecture there: it reports the emulated x86_64 process architecture
under WOW64, or "unknown" for a native arm64 host with no case in its
uname implementation. On windows-11-arm this asked for
cargo-binstall-unknown-pc-windows-msvc.zip, which has no pinned digest,
and the script exited before installing anything.
Derive the Windows architecture from PROCESSOR_ARCHITEW6432 (set only
under WOW64/x64 emulation, to the true native architecture) falling
back to PROCESSOR_ARCHITECTURE instead, so both a native arm64 host and
an x64-emulated bash on an arm64 host resolve to the aarch64 archive.
The x64 leg still resolves to the same x86_64 archive as before.1 parent 6340166 commit c1d1765
1 file changed
Lines changed: 11 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
47 | 57 | | |
48 | 58 | | |
49 | 59 | | |
| |||
0 commit comments