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 }