From 48cc838cd274bc598b9a5282e7e90a109f0343a2 Mon Sep 17 00:00:00 2001 From: Wojciech Sciesinski <wojciech@sciesinski.net> Date: Fri, 15 Feb 2019 22:59:38 +0100 Subject: [PATCH] (maint) Compare to against Null on the left, remove a trailng space --- .../helpers/functions/Install-ChocolateyZipPackage.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/chocolatey.resources/helpers/functions/Install-ChocolateyZipPackage.ps1 b/src/chocolatey.resources/helpers/functions/Install-ChocolateyZipPackage.ps1 index 74900621ad..8609b7c226 100644 --- a/src/chocolatey.resources/helpers/functions/Install-ChocolateyZipPackage.ps1 +++ b/src/chocolatey.resources/helpers/functions/Install-ChocolateyZipPackage.ps1 @@ -199,14 +199,14 @@ param( $chocTempDir = $env:TEMP $tempDir = Join-Path $chocTempDir "$($env:chocolateyPackageName)" - if ($env:chocolateyPackageVersion -ne $null) { $tempDir = Join-Path $tempDir "$($env:chocolateyPackageVersion)"; } + if ($null -ne $env:chocolateyPackageVersion) { $tempDir = Join-Path $tempDir "$($env:chocolateyPackageVersion)"; } $tempDir = $tempDir -replace '\\chocolatey\\chocolatey\\', '\chocolatey\' if (![System.IO.Directory]::Exists($tempDir)) { [System.IO.Directory]::CreateDirectory($tempDir) | Out-Null } $downloadFilePath = Join-Path $tempDir "$($packageName)Install.$fileType" if ($url -eq '' -or $url -eq $null) { $url = $file - } + } if ($url64bit -eq '' -or $url64bit -eq $null) { $url64bit = $file64 }