coreutils
coreutils copied to clipboard
RFC: Impossible to verify checksum on Windows for any binary file that has the sequence `\r\n`
hashsum with --check
always run in text mode on Windows:
https://github.com/uutils/coreutils/blob/3f694faa2e9399bcc7838322113cbf4c93575e8e/src/uu/hashsum/src/hashsum.rs#L236-L247
And you can't specify --binary
https://github.com/uutils/coreutils/blob/3f694faa2e9399bcc7838322113cbf4c93575e8e/src/uu/hashsum/src/hashsum.rs#L225-L227
So this happens
(top is running Linux, bottom is running Windows + coreutils)
I don't know if the mode for --check
is supposed to be derived from the binary marker, but that would be one way to address the issue. However, that still requires (most of the time) some hack to modify the checksum file that ships with the binary to include the binary marker, because it's not included unless --binary
is specified.
At the current state, the check mode is useless