Skip to content

Commit 5ca41e3

Browse files
committed
testing the process killing
1 parent 141fde2 commit 5ca41e3

1 file changed

Lines changed: 10 additions & 12 deletions

File tree

runners/console/index.ts

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff 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();

0 commit comments

Comments
 (0)