File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -941,16 +941,6 @@ export class Console extends Runner {
941941 for ( let asyncProcess of this . asyncProcesses ) {
942942 killProcessesRecursively ( systemProcesses , asyncProcess . pid ) ;
943943 }
944- }
945- for ( let proc of systemProcesses ) {
946- if ( path . normalize ( proc . path ) . includes ( path . normalize ( this . getWorkingDirectory ( ) ) ) ) {
947- try {
948- process . kill ( proc . pid ) ;
949- } catch ( e ) {
950- console . error ( "Error killing process " + proc . name + " with id: " + proc . pid , e ) ;
951- }
952- }
953- }
954944 //Check if there are still running processes on the given ports
955945 // Maybe not needed anymore can be deleted and the function documentation should be updated
956946 for ( let asyncProcess of this . asyncProcesses . reverse ( ) ) {
@@ -965,9 +955,17 @@ export class Console extends Runner {
965955 }
966956 }
967957 }
968-
969-
958+ for ( let proc of systemProcesses ) {
959+ if ( path . normalize ( proc . path ) . includes ( path . normalize ( this . getWorkingDirectory ( ) ) ) ) {
960+ try {
961+ process . kill ( proc . pid ) ;
962+ } catch ( e ) {
963+ console . error ( "Error killing process " + proc . name + " with id: " + proc . pid , e ) ;
964+ }
965+ }
966+ }
970967 }
968+ }
971969
972970 private async cleanUp ( ) : Promise < void > {
973971 await this . killAsyncProcesses ( ) ;
You can’t perform that action at this time.
0 commit comments