File tree Expand file tree Collapse file tree 5 files changed +11
-7
lines changed
workbench/contrib/debug/node Expand file tree Collapse file tree 5 files changed +11
-7
lines changed Original file line number Diff line number Diff line change 225
225
"@vscode/windows-registry" : " 1.0.6" ,
226
226
"windows-foreground-love" : " 0.4.0" ,
227
227
"windows-mutex" : " 0.4.1" ,
228
- "windows-process-tree" : " ^ 0.3.2 "
228
+ "windows-process-tree" : " 0.3.3 "
229
229
},
230
230
"resolutions" : {
231
231
"elliptic" : " ^6.5.3" ,
Original file line number Diff line number Diff line change @@ -133,6 +133,10 @@ export function listProcesses(rootPid: number): Promise<ProcessItem> {
133
133
134
134
( import ( 'windows-process-tree' ) ) . then ( windowsProcessTree => {
135
135
windowsProcessTree . getProcessList ( rootPid , ( processList ) => {
136
+ if ( ! processList ) {
137
+ reject ( new Error ( `Root process ${ rootPid } not found` ) ) ;
138
+ return ;
139
+ }
136
140
windowsProcessTree . getProcessCpuUsage ( processList , ( completeProcessList ) => {
137
141
const processItems : Map < number , ProcessItem > = new Map ( ) ;
138
142
completeProcessList . forEach ( process => {
Original file line number Diff line number Diff line change @@ -132,7 +132,7 @@ export class WindowsShellHelper extends Disposable implements IWindowsShellHelpe
132
132
windowsProcessTree = await import ( 'windows-process-tree' ) ;
133
133
}
134
134
this . _currentRequest = new Promise < string > ( resolve => {
135
- windowsProcessTree . getProcessTree ( this . _rootProcessId , ( tree : any /* WindowsProcessTreeType.IProcessTreeNode | undefined */ ) => {
135
+ windowsProcessTree . getProcessTree ( this . _rootProcessId , tree => {
136
136
const name = this . traverseTree ( tree ) ;
137
137
this . _currentRequest = undefined ;
138
138
resolve ( name ) ;
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ export async function hasChildProcesses(processId: number | undefined): Promise<
33
33
if ( platform . isWindows ) {
34
34
const windowsProcessTree = await import ( 'windows-process-tree' ) ;
35
35
return new Promise < boolean > ( resolve => {
36
- windowsProcessTree . getProcessTree ( processId , ( processTree : any /* IProcessTreeNode | undefined */ ) => {
36
+ windowsProcessTree . getProcessTree ( processId , processTree => {
37
37
resolve ( ! ! processTree && processTree . children . length > 0 ) ;
38
38
} ) ;
39
39
} ) ;
Original file line number Diff line number Diff line change 12191
12191
bindings "^1.2.1"
12192
12192
nan "^2.14.0"
12193
12193
12194
- windows-process-tree@^ 0.3.2 :
12195
- version "0.3.2 "
12196
- resolved "https://registry.yarnpkg.com/windows-process-tree/-/windows-process-tree-0.3.2 .tgz#8c39f39e7707e09fd74638a7ef644b5f389096d3 "
12197
- integrity sha512-x8Y4KOV8tUhhPiO0TH7wOMTZ677rw7VEwq+dTuHHiLTClkrNXWSY3XzP6ez3fs2Cab4FajrtmiqRs0jTMZHfyw ==
12194
+
12195
+ version "0.3.3 "
12196
+ resolved "https://registry.yarnpkg.com/windows-process-tree/-/windows-process-tree-0.3.3 .tgz#7c178815f02bf4cfbcac1f93b2f3a3cc10bc9245 "
12197
+ integrity sha512-rkiAMP0AS27xikFyn7i4gPbOK16UdjY8X/C6eo37CnfNLqTvK2eEaT+Dh0e5xnvmlsi0lEKd60O+4ajzfDkq7A ==
12198
12198
dependencies:
12199
12199
nan "^2.13.2"
12200
12200
You can’t perform that action at this time.
0 commit comments