subshell term payload improved
This commit is contained in:
+4
-1
@@ -90,6 +90,10 @@ function on_exit {
|
||||
if [[ -p /dev/stdout ]]; then
|
||||
failure_type='SUBSHELL TERM'
|
||||
failure_payload="$last_error"
|
||||
|
||||
if [[ "$last_error" =~ $regex1 || "$last_error" =~ $regex2 ]]; then
|
||||
failure_payload="${BASH_REMATCH[2]}"
|
||||
fi
|
||||
last_error="${BASH_SOURCE[1]}:${BASH_LINENO[0]} subshell term $code"
|
||||
kill -USR1 $$
|
||||
else
|
||||
@@ -100,7 +104,6 @@ function on_exit {
|
||||
if [[ "$last_error" =~ $regex1 || "$last_error" =~ $regex2 ]]; then
|
||||
line=${BASH_REMATCH[1]}
|
||||
message=${BASH_REMATCH[2]}
|
||||
|
||||
regex='^(.*): unbound variable$'
|
||||
if [[ $code == 1 ]] && [[ "$message" =~ $regex ]]; then
|
||||
failure_type='UNBOUND VARIABLE'
|
||||
|
||||
Reference in New Issue
Block a user