coreutils
coreutils copied to clipboard
hashsum: Should not accept --strict without --check
--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).