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

logging - Don't suggest installing separate "checksum" tool #981

Closed
Daniel15 opened this issue Sep 26, 2016 · 5 comments
Closed

logging - Don't suggest installing separate "checksum" tool #981

Daniel15 opened this issue Sep 26, 2016 · 5 comments

Comments

@Daniel15
Copy link

When installing a package without a checksum, this message is displayed:

If you are a maintainer attempting to determine the checksum for packaging purposes, please run
'choco install checksum' and run 'checksum -t sha256 -f $file'

Installing a separate tool is unnecessary as you can simply use PowerShell to accomplish the same thing:

(Get-FileHash -Path $file -Algorithm SHA256).Hash
@ferventcoder
Copy link
Member

Unfortunately you know this but you may have missed this was first added in either PowerShell 4 or 5. I believe it was the latter.

@ferventcoder
Copy link
Member

So we suggest tools that have the greatest compatibility. Plus it is the tool that choco uses.
HTH

@Daniel15
Copy link
Author

Looks like it was added in PowerShell 4.0 according to MSDN.

It would be nice if Chocolatey checked the user's PowerShell version and suggested Get-FileHash if they're on PowerShell 4.0 or higher. No point installing an external tool if the user has a modern PowerShell version 😄

@ferventcoder
Copy link
Member

That is something we could possibly do. Thanks for the suggestion!

@ferventcoder ferventcoder added this to the 0.10.x milestone Aug 27, 2017
SeanKilleen added a commit to SeanKilleen/choco that referenced this issue Dec 16, 2018
…nd above

For compatibility reasons, Chocolatey suggests using `choco install checksum` to verify checksums.

But, in Powershell v4 and beyond, users could choose to run `Get-FileHash` as well.

This change adds a message in applicable powershell versions (v4.x and later) to suggest this course of action.
SeanKilleen added a commit to SeanKilleen/choco that referenced this issue Dec 16, 2018
…nd above

For compatibility reasons, Chocolatey suggests using `choco install
checksum` to verify checksums.

But, in Powershell v4 and beyond, users could choose to run
`Get-FileHash` as well.

This change adds a message in applicable powershell versions (v4.x and
later) to suggest this course of action.
ferventcoder pushed a commit that referenced this issue Jan 18, 2019
For compatibility reasons, Chocolatey suggests using `choco install
checksum` to verify checksums.

But, in Powershell v4 and beyond, users could choose to run
`Get-FileHash` as well.

This change adds a message in applicable powershell versions (v4.x and
later) to suggest this course of action.
ferventcoder added a commit that referenced this issue Jan 18, 2019
* stable:
  (GH-981) Add option to use Get-FileHash for versions v4.x and above
  (GH-661) allow local only without sources
@ferventcoder ferventcoder self-assigned this Jan 18, 2019
@ferventcoder ferventcoder modified the milestones: 0.10.x, 0.10.12 Jan 18, 2019
@ferventcoder
Copy link
Member

Thank you @SeanKilleen for putting that together. This will be released in 0.10.12.

@ferventcoder ferventcoder changed the title Don't suggest installing separate "checksum" tool logging - Don't suggest installing separate "checksum" tool Jan 18, 2019
galeksandrp pushed a commit to galeksandrp/choco that referenced this issue Feb 16, 2019
…nd above

For compatibility reasons, Chocolatey suggests using `choco install
checksum` to verify checksums.

But, in Powershell v4 and beyond, users could choose to run
`Get-FileHash` as well.

This change adds a message in applicable powershell versions (v4.x and
later) to suggest this course of action.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants