-
Notifications
You must be signed in to change notification settings - Fork 114
Open
Description
On an arm64 Windows host, running
> powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
Downloading uv 0.8.15 (x86_64-pc-windows-msvc)
As you can see, it picks an x86_64 release to download & install.
After some digging, it seems like this logic:
$a = [System.Reflection.Assembly]::LoadWithPartialName("System.Runtime.InteropServices.RuntimeInformation")
$t = $a.GetType("System.Runtime.InteropServices.RuntimeInformation")
$p = $t.GetProperty("OSArchitecture")
$p.GetValue($null)
Returns X64
when executed via powershell.exe
. It returns the correct value from Powershell Core (aka pwsh.exe
), and indeed:
> pwsh -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
Downloading uv 0.8.15 (aarch64-pc-windows-msvc)
version info:
> powershell -c 'echo $PSVersionTable'
Name Value
---- -----
PSVersion 5.1.26100.5074
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.26100.5074
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
> pwsh -c 'echo $PSVersionTable'
Name Value
---- -----
PSVersion 7.5.0
PSEdition Core
GitCommitId 7.5.0
OS Microsoft Windows 10.0.26100
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Metadata
Metadata
Assignees
Labels
No labels