coreutils icon indicating copy to clipboard operation
coreutils copied to clipboard

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

Open BenWiederhake opened this issue 8 months ago • 1 comments

--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 (2769a5c82c2784ede2ca79bb77150347f01e6240).

BenWiederhake avatar May 26 '24 15:05 BenWiederhake