Do not send event on INT signal (#1773)

* do not send event on INT signal
This commit is contained in:
Hubert Deng 2022-10-20 15:31:55 -07:00 committed by GitHub
parent 3220ed7469
commit 58caa0c7a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -176,7 +176,8 @@ cleanup () {
fi
echo "$traceback"
if [ "$REPORT_SELF_HOSTED_ISSUES" == 1 ]; then
# Only send event when report issues flag is set and if trap signal is not INT (ctrl+c)
if [[ "$REPORT_SELF_HOSTED_ISSUES" == 1 && "$1" != "INT" ]]; then
local event_hash=$(echo -n "$cmd_exit $traceback" | docker run -i --rm busybox md5sum | cut -d' ' -f1)
send_event "$event_hash" "$cmd_exit"
fi