execute_fileevent: use exit status instead of stderr data in status report

This commit is contained in:
stefan schippers 2023-10-23 10:33:08 +02:00
parent d82ad002e8
commit 4f4872fa7b
1 changed files with 5 additions and 1 deletions

View File

@ -254,7 +254,11 @@ proc execute_fileevent {id} {
if {"CHILDSTATUS" == [lindex $errorCode 0]} {
set exit_status [lindex $errorCode 2]
}
if {$exit_status != 0} {
if {$report} {viewdata "Failed: $execute(cmd,$id)\nstderr:\n$err\ndata:\n$execute(data,$id)"}
} else {
if {$report} {viewdata "Completed: $execute(cmd,$id)\nstderr:\n$err\ndata:\n$execute(data,$id)"}
}
} else {
if {$report} {viewdata "Completed: $execute(cmd,$id)\ndata:\n$execute(data,$id)"}
}