From b36afc8498326e83503ed244941e4bf81bfda507 Mon Sep 17 00:00:00 2001 From: Kun Ren Date: Tue, 11 Jan 2022 06:47:03 +0000 Subject: [PATCH] Use taskkill for win32 (#936) * Use taskkill for win32 * Use spawn + taskkill in windows * Revert to using tree-kill --- src/util.ts | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/util.ts b/src/util.ts index c5e568984..638365ee7 100644 --- a/src/util.ts +++ b/src/util.ts @@ -411,13 +411,7 @@ export function asDisposable(toDispose: T, disposeFunction: (...args: unknown export type DisposableProcess = cp.ChildProcessWithoutNullStreams & vscode.Disposable; export function exec(command: string, args?: ReadonlyArray, options?: cp.CommonOptions, onDisposed?: () => unknown): DisposableProcess { - let proc: cp.ChildProcess; - if (process.platform === 'win32') { - const cmd = `"${command}" ${args.map(s => `"${s}"`).join(' ')}`; - proc = cp.exec(cmd, options); - } else { - proc = cp.spawn(command, args, options); - } + const proc = cp.spawn(command, args, options); let running = true; const exitHandler = () => { running = false;