chocolatey / choco

Chocolatey - the package manager for Windows
https://chocolatey.org
Other
10.04k stars 890 forks source link

(#3462) Use Get-FileHash cmdlet where possible #3463

Open flcdrg opened 3 weeks ago

flcdrg commented 3 weeks ago

Description Of Changes

Allow use of the Get-FileHash cmdlet when running with versions of PowerShell that include it

Motivation and Context

Thsi should resolve the issue of checksums being unable to be verified for files greater than 2GB. It should also be faster.

Testing

Tested in Vagrant

Operating Systems Testing

Change Types Made

Change Checklist

Related Issue

Fixes chocolatey/checksum#23

pauby commented 3 weeks ago

Was Get-FileHash available in PowerShell version 3.0?

flcdrg commented 3 weeks ago

I'm assuming not, as it isn't listed in the 3.0 docs, but is for 4.0

pauby commented 3 weeks ago

As we still support PowerShell version 3.0, this isn't something I feel we should pull in I'll speak to the team about.

pauby commented 3 weeks ago

I've moved the issue for this over to the checksum repository. Rather than changing the way we calculate hashes, we're going to look at improving checksum.exe so won't be progressing with this PR.

We appreciate you submitting it, @flcdrg. I'll leave this open for any further comments before closing it.