Yashisinghal285 commented on code in PR #13447:
URL: https://github.com/apache/maven/pull/13447#discussion_r4251649648


##########
apache-maven/src/assembly/maven/bin/mvn:
##########
@@ -414,10 +421,18 @@ concat_lines() {
       printf '  Maven basedir: %s\n' "$MAVEN_PROJECTBASEDIR" >&2
       printf '  Java command: %s\n' "$JAVACMD" >&2
       echo "  Parser output:" >&2
-      printf '%s\n' "$parser_output" | sed 's/^/    /' >&2
+      if [ -s "$parser_stderr_file" ]; then
+        while IFS= read -r parser_err_line || [ -n "$parser_err_line" ]; do
+          printf '    %s\n' "$parser_err_line" >&2
+        done < "$parser_stderr_file"
+      elif [ -n "$parser_output" ]; then
+        printf '    %s\n' "$parser_output" >&2
+      fi
+      rm -f "$parser_stderr_file" 2>/dev/null || :
       exit 1

Review Comment:
   Updated the error handler so both stderr diagnostics and stdout are 
preserved if present.



-- 
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