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

Add checksum verification for file protocol in Get-ChocolateyWebFile #3518

Closed

Conversation

nap123-sys
Copy link

@nap123-sys nap123-sys commented Sep 21, 2024

Fixes #3515

Add checksum verification for "file:" protocol in Get-ChocolateyWebFile function.

  • Add checksum verification for the file: protocol using the Get-ChecksumValid function.
  • Skip copying the file if the checksum is valid.
  • Copy the file if the checksum is invalid.
  • Continue calling Get-ChocolateyWebFile to download files in Install-ChocolateyPackage function.

For more details, open the Copilot Workspace session.

Fixes #3515

Add checksum verification for "file:" protocol in Get-ChocolateyWebFile function.

* Add checksum verification for the `file:` protocol using the `Get-ChecksumValid` function.
* Skip copying the file if the checksum is valid.
* Copy the file if the checksum is invalid.
* Continue calling `Get-ChocolateyWebFile` to download files in `Install-ChocolateyPackage` function.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/chocolatey/choco/issues/3515?shareId=XXXX-XXXX-XXXX-XXXX).
@CLAassistant
Copy link

CLAassistant commented Sep 21, 2024

CLA assistant check
All committers have signed the CLA.

@pauby
Copy link
Member

pauby commented Sep 21, 2024

@nap123-sys Thanks for the PR.

As I mentioned over on this comment, Get-ChocolateyWebFile is to retrieve files from the web (i.e. with http / https). The function is therefore working as intended.

We have a PR template that needs to be completed, which was removed in this case, and CONTRIBUTING and COMMITTERS documentation that needs to be followed. Part of that is getting buy-in from the team on any raised issue. This didn't happen here. But the documentation will help if you submit a PR in future.

Thanks again for the PR and for contributing to Chocolatey CLI. For the reasons I mentioned above, I'll close this now.

@pauby pauby closed this Sep 21, 2024
@nap123-sys
Copy link
Author

Alright.

@nap123-sys nap123-sys deleted the add-checksum-verification branch September 22, 2024 10:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add checksum verification for "file:" protocol in Get-ChocolateyWebFile
3 participants