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;