Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
wants to merge 1 commit into from

Conversation

flcdrg
Copy link
Member

@flcdrg flcdrg commented Jun 10, 2024

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

  • Bug fix (non-breaking change).
  • Feature / Enhancement (non-breaking change).
  • Breaking change (fix or feature that could cause existing functionality to change).
  • Documentation changes.
  • PowerShell code changes.

Change Checklist

  • Requires a change to the documentation.
  • Documentation has been updated.
  • Tests to cover my changes, have been added.
  • All new and existing tests passed?
  • PowerShell code changes: PowerShell v3 compatibility checked?

Related Issue

Fixes chocolatey/checksum#23

@pauby
Copy link
Member

pauby commented Jun 10, 2024

Was Get-FileHash available in PowerShell version 3.0?

@flcdrg
Copy link
Member Author

flcdrg commented Jun 10, 2024

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

@pauby
Copy link
Member

pauby commented Jun 10, 2024

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.

- Use this cmdlet if it is available in preference to checksum.exe as it should be faster and support larger file sizes

Resolves #3462
@flcdrg flcdrg force-pushed the use-get-filehash branch from 9f359fe to dc5b744 Compare June 11, 2024 09:23
@pauby
Copy link
Member

pauby commented Jun 11, 2024

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.

@github-actions github-actions bot added the Pending Closure This issue has been marked as having no response or is stale and will soon be closed. label Jul 12, 2024
Copy link

Dear contributor,

As this PR seems to have been inactive for 30 days after changes / additional information
was requested, it has been automatically closed.
If you feel the changes are still valid, please re-open the PR once all changes or additional information
that was requested has been added.
Thank you for your contribution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0 - Waiting on User No Response / Stale Pending Closure This issue has been marked as having no response or is stale and will soon be closed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Chocolatey is using checksum.exe which is slow and can't cope with larger than 2GB files
3 participants