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 {
417
417
} ) ;
418
418
419
419
this . currentExecution ?. kill ( ) . catch ( ( ) => { } ) ;
420
- this . taskRunProcessProvider . cleanup ( ) ;
420
+ this . taskRunProcessProvider . cleanup ( ) . catch ( ( ) => { } ) ;
421
421
422
422
process . exit ( code ) ;
423
423
}
@@ -558,7 +558,15 @@ export class ManagedRunController {
558
558
}
559
559
560
560
// 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
+ }
562
570
563
571
// Close the socket
564
572
this . socket . close ( ) ;
Original file line number Diff line number Diff line change @@ -162,11 +162,11 @@ export class TaskRunProcessProvider {
162
162
/**
163
163
* Forces cleanup of any persistent process
164
164
*/
165
- cleanup ( ) : void {
165
+ async cleanup ( ) {
166
166
if ( this . persistentProcess ) {
167
167
this . sendDebugLog ( "cleanup() called" ) ;
168
168
169
- this . cleanupProcess ( this . persistentProcess ) ;
169
+ await this . cleanupProcess ( this . persistentProcess ) ;
170
170
}
171
171
}
172
172
You can’t perform that action at this time.
0 commit comments