You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by sl...@apache.org on 2024/12/16 08:44:01 UTC

(maven-wrapper) branch master updated: [MWRAPPER-150] - Fails to validate checksums on MacOS Sequoia (#155)

This is an automated email from the ASF dual-hosted git repository.

slachiewicz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-wrapper.git


The following commit(s) were added to refs/heads/master by this push:
     new b2ff9cd  [MWRAPPER-150] - Fails to validate checksums on MacOS Sequoia (#155)
b2ff9cd is described below

commit b2ff9cdfa2d4a1f2bc0d4f039c0efc297b0c5875
Author: Jon Chambers <63...@users.noreply.github.com>
AuthorDate: Mon Dec 16 03:43:55 2024 -0500

    [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
---
 maven-wrapper-distribution/src/resources/mvnw      | 2 +-
 maven-wrapper-distribution/src/resources/only-mvnw | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/maven-wrapper-distribution/src/resources/mvnw b/maven-wrapper-distribution/src/resources/mvnw
old mode 100644
new mode 100755
index de92566..8557c19
--- a/maven-wrapper-distribution/src/resources/mvnw
+++ b/maven-wrapper-distribution/src/resources/mvnw
@@ -290,7 +290,7 @@ done <"$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.properties"
 if [ -n "$wrapperSha256Sum" ]; then
   wrapperSha256Result=false
   if command -v sha256sum >/dev/null; then
-    if echo "$wrapperSha256Sum  $wrapperJarPath" | sha256sum -c >/dev/null 2>&1; then
+    if echo "$wrapperSha256Sum  $wrapperJarPath" | sha256sum -c - >/dev/null 2>&1; then
       wrapperSha256Result=true
     fi
   elif command -v shasum >/dev/null; then
diff --git a/maven-wrapper-distribution/src/resources/only-mvnw b/maven-wrapper-distribution/src/resources/only-mvnw
index 02b2e72..21c1f01 100755
--- a/maven-wrapper-distribution/src/resources/only-mvnw
+++ b/maven-wrapper-distribution/src/resources/only-mvnw
@@ -227,7 +227,7 @@ if [ -n "${distributionSha256Sum-}" ]; then
     echo "Please disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." >&2
     exit 1
   elif command -v sha256sum >/dev/null; then
-    if echo "$distributionSha256Sum  $TMP_DOWNLOAD_DIR/$distributionUrlName" | sha256sum -c >/dev/null 2>&1; then
+    if echo "$distributionSha256Sum  $TMP_DOWNLOAD_DIR/$distributionUrlName" | sha256sum -c - >/dev/null 2>&1; then
       distributionSha256Result=true
     fi
   elif command -v shasum >/dev/null; then