Skip to content
This repository has been archived by the owner on Feb 19, 2019. It is now read-only.

Commit

Permalink
(GH-535) Use 32bit checksum/checksumtype when force x86
Browse files Browse the repository at this point in the history
Previously when forcing x86, packages that specify a checksum will fail
based on a bad checksum. This ensures that when force x86 is specified, the
package will be checked with the 32bit checksum and checksumtype.
  • Loading branch information
ferventcoder committed Aug 1, 2014
1 parent 5a9a584 commit 215c70e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/helpers/functions/Get-ChocolateyWebFile.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ param(
Write-Debug "Running 'Get-ChocolateyWebFile' for $packageName with url:`'$url`', fileFullPath:`'$fileFullPath`', url64bit:`'$url64bit`', checksum: `'$checksum`', checksumType: `'$checksumType`', checksum64: `'$checksum64`', checksumType64: `'$checksumType64`'";

$url32bit = $url;
$checksum32 = $checksum
$checksumType32 = $checksumType
$bitWidth = 32
if (Get-ProcessorBits 64) {
$bitWidth = 64
Expand All @@ -70,6 +72,8 @@ param(
Write-Debug "User specified -x86 so forcing 32 bit"
$bitPackage = 32
$url = $url32bit
$checksum = $checksum32
$checksumType = $checksumType32
}

$headers = @{}
Expand Down

0 comments on commit 215c70e

Please sign in to comment.