Skip to content

Commit

Permalink
chocolatey-visualstudio.extension: fix PS 2.0 support and style
Browse files Browse the repository at this point in the history
In PS 2.0, foreach over $null produces one $null.
  • Loading branch information
jberezanski committed May 15, 2018
1 parent 110383e commit c8a6724
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,11 @@ function Install-VSInstaller
$parametersToRemove = $PackageParameters.Keys | Where-Object { $whitelist -notcontains $_ }
foreach ($parameterToRemove in $parametersToRemove)
{
if ($parameterToRemove -eq $null)
{
continue
}

Write-Debug "Filtering out package parameter not passed to the bootstrapper during VS Installer update: '$parameterToRemove'"
$PackageParameters.Remove($parameterToRemove)
}
Expand Down

0 comments on commit c8a6724

Please sign in to comment.