mirror of
https://github.com/PowerShell/openssh-portable.git
synced 2025-07-13 17:04:43 +02:00
change validity check from count check to null-check
This commit is contained in:
parent
d803aaf38f
commit
1aa53ff3b2
@ -601,8 +601,8 @@ function Get-VS2015BuildToolPath
|
|||||||
$searchPath += "\amd64"
|
$searchPath += "\amd64"
|
||||||
}
|
}
|
||||||
$toolAvailable = @()
|
$toolAvailable = @()
|
||||||
$toolAvailable += Get-ChildItem -path $searchPath\* -Filter "MSBuild.exe" -ErrorAction SilentlyContinue
|
$toolAvailable = Get-ChildItem -path $searchPath\* -Filter "MSBuild.exe" -ErrorAction SilentlyContinue
|
||||||
if($toolAvailable.count -eq 0)
|
if($null -eq $toolAvailable)
|
||||||
{
|
{
|
||||||
return $null
|
return $null
|
||||||
}
|
}
|
||||||
@ -689,7 +689,7 @@ function Get-Windows10SDKVersion
|
|||||||
$minSDKVersion = [version]"10.0.17763.0"
|
$minSDKVersion = [version]"10.0.17763.0"
|
||||||
$versionsAvailable = @()
|
$versionsAvailable = @()
|
||||||
$versionsAvailable = Get-ChildItem $windowsSDKPath | ? {$_.Name.StartsWith("10.")} | % {$version = [version]$_.Name; if(($version.CompareTo($minSDKVersion) -ge 0)) {$version.ToString()}}
|
$versionsAvailable = Get-ChildItem $windowsSDKPath | ? {$_.Name.StartsWith("10.")} | % {$version = [version]$_.Name; if(($version.CompareTo($minSDKVersion) -ge 0)) {$version.ToString()}}
|
||||||
if(0 -eq $versionsAvailable.count)
|
if($null -eq $versionsAvailable)
|
||||||
{
|
{
|
||||||
return $null
|
return $null
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user