File tree Expand file tree Collapse file tree
services/apps/security_best_practices_worker/src/activities Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -221,11 +221,18 @@ async function runBinary(
221221 } )
222222
223223 proc . on ( 'close' , ( code ) => {
224- if ( code === 0 ) {
225- svc . log . info ( `Binary completed successfully` )
224+ // exit code 0 = all tests passed, 1 = some tests failed — both mean the
225+ // evaluation ran to completion and wrote its output file
226+ if ( code === 0 || code === 1 ) {
227+ svc . log . info ( `Binary completed with exit code ${ code } ` )
226228 resolve ( { stdout, stderr } )
227229 } else {
228- reject ( new Error ( `Binary exited with code ${ code } \nStderr:\n${ stderr } Stdout:\n${ stdout } ` ) )
230+ const truncated = ( s : string ) => ( s . length > 500 ? s . slice ( 0 , 500 ) + '…' : s )
231+ reject (
232+ new Error (
233+ `Binary exited with code ${ code } \nStderr:\n${ truncated ( stderr ) } Stdout:\n${ truncated ( stdout ) } ` ,
234+ ) ,
235+ )
229236 }
230237 } )
231238 } )
You can’t perform that action at this time.
0 commit comments