Skip to content

Commit eb17fc8

Browse files
authored
Fixes useExec promise not returning if there's no work to do
1 parent e96ab81 commit eb17fc8

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/vs/base/node/processes.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -321,14 +321,14 @@ export abstract class AbstractProcess<TProgressData> {
321321
private useExec(): Promise<boolean> {
322322
return new Promise<boolean>((c, e) => {
323323
if (!this.shell || !Platform.isWindows) {
324-
c(false);
324+
return c(false);
325325
}
326326
let cmdShell = cp.spawn(getWindowsShell(), ['/s', '/c']);
327327
cmdShell.on('error', (error: Error) => {
328-
c(true);
328+
return c(true);
329329
});
330330
cmdShell.on('exit', (data: any) => {
331-
c(false);
331+
return c(false);
332332
});
333333
});
334334
}
@@ -470,4 +470,4 @@ export namespace win32 {
470470
}
471471
return path.join(cwd, command);
472472
}
473-
}
473+
}

0 commit comments

Comments
 (0)