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

corepkgs.fetchurl: comment typo #2647

Closed
wants to merge 1 commit into from
Closed

corepkgs.fetchurl: comment typo #2647

wants to merge 1 commit into from

Conversation

ghost
Copy link

@ghost ghost commented Jan 22, 2019

Hello,

I'm trying to understand the internals and was reading through the core packages. I noticed this typo but I'd also like to know if these are correct:

https://github.com/NixOS/nix/blob/master/corepkgs/fetchurl.nix#L9-L10

, outputHashAlgo ?
    if hash != "" then "" else if sha512 != "" then "sha512" else if sha1 != "" then "sha1" else if md5 != "" then "md5" else "sha256"

Shouldn't it be if hash != "" then hash?

@edolstra
Copy link
Member

No, this is outputHashAlgo, which should be empty when outputHash is an SRI hash (since it already includes the hash algorithm).

@ghost ghost closed this Sep 10, 2019
This pull request was closed.
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.

None yet

1 participant