Skip to content

Commit b2ff9cd

Browse files
authored
[MWRAPPER-150] - Fails to validate checksums on MacOS Sequoia (#155)
The version of `sha256sum` included in macOS Sequoia does not read from stdin by default
1 parent 1830d81 commit b2ff9cd

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

maven-wrapper-distribution/src/resources/mvnw

100644100755
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ done <"$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.properties"
290290
if [ -n "$wrapperSha256Sum" ]; then
291291
wrapperSha256Result=false
292292
if command -v sha256sum >/dev/null; then
293-
if echo "$wrapperSha256Sum $wrapperJarPath" | sha256sum -c >/dev/null 2>&1; then
293+
if echo "$wrapperSha256Sum $wrapperJarPath" | sha256sum -c - >/dev/null 2>&1; then
294294
wrapperSha256Result=true
295295
fi
296296
elif command -v shasum >/dev/null; then

maven-wrapper-distribution/src/resources/only-mvnw

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ if [ -n "${distributionSha256Sum-}" ]; then
227227
echo "Please disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." >&2
228228
exit 1
229229
elif command -v sha256sum >/dev/null; then
230-
if echo "$distributionSha256Sum $TMP_DOWNLOAD_DIR/$distributionUrlName" | sha256sum -c >/dev/null 2>&1; then
230+
if echo "$distributionSha256Sum $TMP_DOWNLOAD_DIR/$distributionUrlName" | sha256sum -c - >/dev/null 2>&1; then
231231
distributionSha256Result=true
232232
fi
233233
elif command -v shasum >/dev/null; then

0 commit comments

Comments
 (0)