aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorsoroshsabz <soorosh_abi@hotmail.com>2019-02-22 22:17:48 +0330
committerVictor Romero <romerosanchezv@gmail.com>2019-02-22 10:47:48 -0800
commit2140d3c5eb5ec5e54254db032093e7697d7ec8fe (patch)
tree58c6ec50230efe349b3d395f8d3caf6bddbaba93 /scripts
parent8fd34506c3f2d06af8abd8cfbb543ad16e79c6a3 (diff)
downloadvcpkg-2140d3c5eb5ec5e54254db032093e7697d7ec8fe.tar.gz
vcpkg-2140d3c5eb5ec5e54254db032093e7697d7ec8fe.zip
[bootstrap.ps1] Fixed some possible incorrect comparison with null warnings. (#5343)
* Fixed some possible incorrect comparison with null warnings. * Correct bad indentation. * Removed extra space.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/bootstrap.ps112
1 files changed, 6 insertions, 6 deletions
diff --git a/scripts/bootstrap.ps1 b/scripts/bootstrap.ps1
index 0a24afa05..07a9fcbaa 100644
--- a/scripts/bootstrap.ps1
+++ b/scripts/bootstrap.ps1
@@ -25,7 +25,7 @@ $withVSPath = $withVSPath -replace "\\$" # Remove potential trailing backslash
function vcpkgHasProperty([Parameter(Mandatory=$true)][AllowNull()]$object, [Parameter(Mandatory=$true)]$propertyName)
{
- if ($object -eq $null)
+ if ($null -eq $object)
{
return $false
}
@@ -36,12 +36,12 @@ function vcpkgHasProperty([Parameter(Mandatory=$true)][AllowNull()]$object, [Par
function getProgramFiles32bit()
{
$out = ${env:PROGRAMFILES(X86)}
- if ($out -eq $null)
+ if ($null -eq $out)
{
$out = ${env:PROGRAMFILES}
}
- if ($out -eq $null)
+ if ($null -eq $out)
{
throw "Could not find [Program Files 32-bit]"
}
@@ -138,7 +138,7 @@ function getVisualStudioInstances()
function findAnyMSBuildWithCppPlatformToolset([string]$withVSPath)
{
$VisualStudioInstances = getVisualStudioInstances
- if ($VisualStudioInstances -eq $null)
+ if ($null -eq $VisualStudioInstances)
{
throw "Could not find Visual Studio. VS2015 or VS2017 (with C++) needs to be installed."
}
@@ -210,7 +210,7 @@ function getWindowsSDK( [Parameter(Mandatory=$False)][switch]$DisableWin10SDK =
# Windows 10 SDK
function CheckWindows10SDK($path)
{
- if ($path -eq $null)
+ if ($null -eq $path)
{
return
}
@@ -262,7 +262,7 @@ function getWindowsSDK( [Parameter(Mandatory=$False)][switch]$DisableWin10SDK =
# Windows 8.1 SDK
function CheckWindows81SDK($path)
{
- if ($path -eq $null)
+ if ($null -eq $path)
{
return
}