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

hashsum: Should not accept --strict without --check #6436

Open
BenWiederhake opened this issue May 26, 2024 · 1 comment
Open

hashsum: Should not accept --strict without --check #6436

BenWiederhake opened this issue May 26, 2024 · 1 comment

Comments

@BenWiederhake
Copy link
Collaborator

--strict without --check is meaningless, and we should raise an error accordingly. Just like GNU does:

$ ../gnu/src/md5sum --strict < /dev/null
../gnu/src/md5sum: the --strict option is meaningful only when verifying checksums
Try '../gnu/src/md5sum --help' for more information.
[$? = 1]
$ cargo run -q md5sum --strict < /dev/null
d41d8cd98f00b204e9800998ecf8427e  -
$ # No error!

Found while reviewing #6431, but also present on current main (2769a5c).

@BenWiederhake
Copy link
Collaborator Author

Also happens with --quiet:

$ ../gnu/src/md5sum --quiet checksum 
../gnu/src/md5sum: the --quiet option is meaningful only when verifying checksums
Try '../gnu/src/md5sum --help' for more information.
[$? = 1]
$ cargo run -q md5sum --quiet checksum 
1115e2b9f170b1ddea1b1c50534c73ff  checksum

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

1 participant