Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions src/platform/common/process/proc.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import {
import { logProcess } from './logger.node';
import { noop } from '../utils/misc';
import { dispose } from '../utils/lifecycle';
import { fileToCommandArgument } from '../helpers';

export class BufferDecoder implements IBufferDecoder {
public decode(buffers: Buffer[]): string {
Expand Down Expand Up @@ -81,7 +80,7 @@ export class ProcessService implements IProcessService {

public execObservable(file: string, args: string[], options: SpawnOptions = {}): ObservableExecutionResult<string> {
const spawnOptions = this.getDefaultOptions(options);
const proc = spawn(fileToCommandArgument(file), args, spawnOptions);
const proc = spawn(file, args, spawnOptions);
Copy link
Contributor Author

@DonJayamanne DonJayamanne Oct 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We shouldn't quote file paths in spawn here
As the first argument itself is the file, & second is the arguments.
Only cases where the command is a combination of file and arguments do we need to quote the file.

let procExited = false;
logger.ci(`Exec observable ${file}, ${args.join(' ')}`);
const disposables: IDisposable[] = [];
Expand Down Expand Up @@ -156,7 +155,7 @@ export class ProcessService implements IProcessService {
}
public exec(file: string, args: string[], options: SpawnOptions = {}): Promise<ExecutionResult<string>> {
const spawnOptions = this.getDefaultOptions(options);
const proc = spawn(fileToCommandArgument(file), args, spawnOptions);
const proc = spawn(file, args, spawnOptions);
const deferred = createDeferred<ExecutionResult<string>>();
const disposable: IDisposable = {
dispose: () => {
Expand Down
Loading