sergehuber commented on code in PR #764:
URL: https://github.com/apache/unomi/pull/764#discussion_r3315931944


##########
build.sh:
##########
@@ -38,12 +36,8 @@ handle_error() {
 
 EOF
     echo "Error occurred in:"
-    echo "  Command: $last_command"
     echo "  Line: $line_no"
     echo "  Exit code: $exit_code"
-    if [ ! -z "$func_trace" ]; then
-        echo "  Function trace: $func_trace"
-    fi
     exit $exit_code

Review Comment:
   Agreed the loss of the command name hurts triage. The trap was simplified 
because passing `$BASH_COMMAND` after a failed `mvn` invocation could produce a 
multi-kilobyte string and hit ARG_MAX. A safe middle ground would be to read 
`BASH_COMMAND` inside `handle_error` itself (instead of passing it through the 
trap) and truncate to a safe length — avoids ARG_MAX while keeping the command 
visible. Happy to add that as a follow-up if useful.



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