mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-28 11:21:12 +08:00
[vcpkg] Bootstrap should use Get-CimInstance instead of Get-WmiObject. (#6788)
* [vcpkg] Bootstrap should use Get-CimInstance instead of Get-WmiObject. This lets it work with Powershell Core 6.0.
This commit is contained in:
parent
18b029a5e3
commit
8cd2d17460
@ -339,7 +339,14 @@ if ($disableMetrics)
|
||||
|
||||
$platform = "x86"
|
||||
$vcpkgReleaseDir = "$vcpkgSourcesPath\msbuild.x86.release"
|
||||
$architecture=(Get-WmiObject win32_operatingsystem | Select-Object osarchitecture).osarchitecture
|
||||
if($PSVersionTable.PSVersion.Major -le 2)
|
||||
{
|
||||
$architecture=(Get-WmiObject win32_operatingsystem | Select-Object osarchitecture).osarchitecture
|
||||
}
|
||||
else
|
||||
{
|
||||
$architecture=(Get-CimInstance win32_operatingsystem | Select-Object osarchitecture).osarchitecture
|
||||
}
|
||||
if ($win64)
|
||||
{
|
||||
if (-not $architecture -like "*64*")
|
||||
|
Loading…
x
Reference in New Issue
Block a user