Skip to content
Merged
Changes from 1 commit
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
6 changes: 5 additions & 1 deletion src/features/execution/runAsTask.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,12 @@ export async function runAsTask(
): Promise<TaskExecution> {
const workspace: WorkspaceFolder | TaskScope = getWorkspaceFolderOrDefault(options.project?.uri);

const executable =
let executable =
environment.execInfo?.activatedRun?.executable ?? environment.execInfo?.run.executable ?? 'python';
// Quote the executable if it contains spaces and is not already quoted
if (executable.includes(' ') && !(executable.startsWith('"') && executable.endsWith('"'))) {
executable = `"${executable}"`;
Comment thread
eleanorjboyd marked this conversation as resolved.
Outdated
}
const args = environment.execInfo?.activatedRun?.args ?? environment.execInfo?.run.args ?? [];
const allArgs = [...args, ...options.args];

Expand Down