File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ import * as path from 'path';
88import * as fs from "fs-extra" ;
99import { ConsoleUtils } from "./consoleUtils" ;
1010
11- const { listProcess } = require ( "process-list" ) ;
11+ const { snapshot } = require ( "process-list" ) ;
1212const findProcess = require ( "find-process" ) ;
1313
1414const os = require ( "os" ) ;
@@ -936,13 +936,13 @@ export class Console extends Runner {
936936 console . error ( "Error killing id " + processIdToKill , e ) ;
937937 }
938938 }
939- let processes = await listProcess ( "name" , "pid" , "ppid" , "path" ) ;
939+ let systemProcesses = await snapshot ( "name" , "pid" , "ppid" , "path" ) ;
940940 if ( this . asyncProcesses . length > 0 ) {
941941 for ( let asyncProcess of this . asyncProcesses ) {
942- killProcessesRecursively ( processes , asyncProcess . pid ) ;
942+ killProcessesRecursively ( systemProcesses , asyncProcess . pid ) ;
943943 }
944944 }
945- for ( let proc of processes ) {
945+ for ( let proc of systemProcesses ) {
946946 if ( path . normalize ( proc . path ) . includes ( path . normalize ( this . getWorkingDirectory ( ) ) ) ) {
947947 try {
948948 process . kill ( proc . pid ) ;
You can’t perform that action at this time.
0 commit comments