Skip to content

Commit

Permalink
(chocolateyGH-253) Fix Zip ChecksumType is ignored
Browse files Browse the repository at this point in the history
Due to defaulting `$url64bit` to `$url`, `$checksumType` was converting
to the 64 bit checksumtype, even if it was empty. Which causes
checksumtype to default to md5, no matter what the checksumtype passed
in is.

Move the checksumType setting for x64 into the check if the urls for 32
bit and 64 bit are different. Additionally, ensure that the
checksumtype64 is not empty.
  • Loading branch information
ferventcoder committed May 2, 2015
1 parent 02ae5c2 commit 8a8bd49
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,10 @@ param(
# only set if urls are different
if ($url32bit -ne $url64bit) {
$checksum = $checksum64
if ($checkSumType64 -ne '') {
$checksumType = $checksumType64
}
}

$checksumType = $checksumType64
}

try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ param(
[string] $packageName,
[string] $url,
[string] $unzipLocation,
[string] $url64bit = $url,
[string] $url64bit = '',
[string] $specificFolder ="",
[string] $checksum = '',
[string] $checksumType = '',
Expand Down

0 comments on commit 8a8bd49

Please sign in to comment.