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
Ignore comments in checksum files #350
Conversation
set noninteractive mode to installation
pin to go 1.15, because it worked//works there; I suspect this is a "debian changed something" issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me. I was curious on what would happen if the test file looked like the example in the packer issue. More specifically containing lines that are not checksums or comments but it looks like parseChecksumLine
would return an error and the caller would continue. So this looks good.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍🏼
case '#', '/', '-': | ||
return nil, nil // skip | ||
} | ||
//TODO: this function will fail if we pass a checksum for a path with spaces |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if I understood this one 👀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
strings.Fields
splits on spacing characters, so if a file being checksummed is "my file.iso"
or "my\ file.iso"
, then the count
of the switch will be all messed up
Thx ! |
This is a tiny simple step towards #217 and hashicorp/packer#10423