maven-wrapper icon indicating copy to clipboard operation
maven-wrapper copied to clipboard

[MWRAPPER-150] - Fails to validate checksums on MacOS Sequoia

Open jon-signal opened this issue 1 year ago • 0 comments

The version of sha256sum that ships with macOS Sequoia appears to have a bug where it does not read from stdin by default, even though its man page says, in part (emphasis added):

In all cases, each file listed on the command line is processed separately. If no files are listed on the command line, or a file name is given as -, input is taken from stdin instead.

…but invoking sha256 as it appears in the mvnw script does not work as expected:

❯ echo '3d8f20ce6103913be8b52aef6d994e0c54705fb527324ceb9b835b338739c7a8  /Users/jon/REDACTED/.mvn/wrapper/maven-wrapper.jar' | sha256sum -c
usage: sha256sum [-bctwz] [files ...]

…which in turn results in a non-successful exit code, which in turn leads to a (rather alarming!) warning about a mismatched checksums and possible compromise.

Adding a - explicitly calls for sha256sum to read from stdin.


To make clear that you license your contribution under the Apache License Version 2.0, January 2004 you have to acknowledge this by using the following check-box.

jon-signal avatar Sep 19 '24 15:09 jon-signal