File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed
packages/cli-v3/src/entryPoints/managed Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -417,7 +417,7 @@ export class ManagedRunController {
417417 } ) ;
418418
419419 this . currentExecution ?. kill ( ) . catch ( ( ) => { } ) ;
420- this . taskRunProcessProvider . cleanup ( ) ;
420+ this . taskRunProcessProvider . cleanup ( ) . catch ( ( ) => { } ) ;
421421
422422 process . exit ( code ) ;
423423 }
@@ -558,7 +558,15 @@ export class ManagedRunController {
558558 }
559559
560560 // Cleanup the task run process provider
561- this . taskRunProcessProvider . cleanup ( ) ;
561+ const [ cleanupError ] = await tryCatch ( this . taskRunProcessProvider . cleanup ( ) ) ;
562+
563+ if ( cleanupError ) {
564+ this . sendDebugLog ( {
565+ runId : this . runFriendlyId ,
566+ message : "Error during task run process provider cleanup" ,
567+ properties : { error : String ( cleanupError ) } ,
568+ } ) ;
569+ }
562570
563571 // Close the socket
564572 this . socket . close ( ) ;
Original file line number Diff line number Diff line change @@ -162,11 +162,11 @@ export class TaskRunProcessProvider {
162162 /**
163163 * Forces cleanup of any persistent process
164164 */
165- cleanup ( ) : void {
165+ async cleanup ( ) {
166166 if ( this . persistentProcess ) {
167167 this . sendDebugLog ( "cleanup() called" ) ;
168168
169- this . cleanupProcess ( this . persistentProcess ) ;
169+ await this . cleanupProcess ( this . persistentProcess ) ;
170170 }
171171 }
172172
You can’t perform that action at this time.
0 commit comments