mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-28 11:21:12 +08:00
(#8013) [vcpkg] Compatibility with pwsh >= 6.2
In Powershell 6.2/7.0, `Get-ChildItem`'s paths are now printed as absolute paths instead of relative paths; this breaks the code we have that assumes that they're printed as relative paths. Thus, change the code to request the `Name` property specifically, which is what we actually wanted.
This commit is contained in:
parent
0777986512
commit
0872eebe34
@ -226,8 +226,9 @@ function getWindowsSDK( [Parameter(Mandatory=$False)][switch]$DisableWin10SDK =
|
||||
$win10sdkVersions = @(Get-ChildItem $folder | Where-Object {$_.Name -match "^10"} | Sort-Object)
|
||||
[array]::Reverse($win10sdkVersions) # Newest SDK first
|
||||
|
||||
foreach ($win10sdkV in $win10sdkVersions)
|
||||
foreach ($win10sdk in $win10sdkVersions)
|
||||
{
|
||||
$win10sdkV = $win10sdk.Name
|
||||
$windowsheader = "$folder\$win10sdkV\um\windows.h"
|
||||
if (!(Test-Path $windowsheader))
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user