aboutsummaryrefslogtreecommitdiff
path: root/scripts/bootstrap.ps1
diff options
context:
space:
mode:
authorTheGoddessInari <thegoddessinari@gmail.com>2019-09-01 05:09:34 -0700
committerNicole Mazzuca <mazzucan@outlook.com>2019-09-06 16:16:15 -0700
commit0872eebe34db686c8d87936e3c39984ab609bd5b (patch)
tree75442bc5c1986360a976478969eacd617bb7ceb8 /scripts/bootstrap.ps1
parent07779865122906795793f1971bdf9e3eaef87585 (diff)
downloadvcpkg-0872eebe34db686c8d87936e3c39984ab609bd5b.tar.gz
vcpkg-0872eebe34db686c8d87936e3c39984ab609bd5b.zip
(#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.
Diffstat (limited to 'scripts/bootstrap.ps1')
-rw-r--r--scripts/bootstrap.ps13
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/bootstrap.ps1 b/scripts/bootstrap.ps1
index 6234efaa3..d2632e57b 100644
--- a/scripts/bootstrap.ps1
+++ b/scripts/bootstrap.ps1
@@ -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))
{