chia7712 commented on code in PR #20658:
URL: https://github.com/apache/kafka/pull/20658#discussion_r2436767831


##########
wrapper.gradle:
##########
@@ -52,6 +55,26 @@ task bootstrapWrapper() {
             sleep 5
             continue
           fi
+        else
+          # Verify checksum of existing wrapper JAR. 
+          # This prevents developers from running into incompatibility issues 
when using an outdated wrapper JAR after a Gradle upgrade.
+          # Use sha256sum or shasum, whichever is available.
+          if command -v sha256sum >/dev/null 2>&1; then
+            LOCAL_WRAPPER_JAR_CHECKSUM=\$(sha256sum "$wrapperJarPath" | awk 
'{print \$1}')
+          elif command -v shasum >/dev/null 2>&1; then
+            LOCAL_WRAPPER_JAR_CHECKSUM=\$(shasum -a 256 "$wrapperJarPath" | 
awk '{print \$1}')
+          else
+            # If no checksum tool is found, exit with an error.

Review Comment:
   `If no checksum tool is found, exit with an error.`  this comment is 
out-of-date, right?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to