From b9fa04c06be0876861017eff5ee032ca71acda3d Mon Sep 17 00:00:00 2001 From: Karthik Nadig Date: Fri, 25 Sep 2020 12:03:08 -0700 Subject: [PATCH 1/3] Do not quote isolated in exec module --- src/client/common/process/internal/python.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/common/process/internal/python.ts b/src/client/common/process/internal/python.ts index d553e54293c1..ef24d4c6d684 100644 --- a/src/client/common/process/internal/python.ts +++ b/src/client/common/process/internal/python.ts @@ -28,7 +28,7 @@ export function execCode(code: string, isolated = true): string[] { export function execModule(name: string, moduleArgs: string[], isolated = true): string[] { const args = ['-m', name, ...moduleArgs]; if (isolated) { - args[0] = ISOLATED.fileToCommandArgument(); + args[0] = ISOLATED; } // "code" isn't specific enough to know how to parse it, // so we only return the args. From ecf02214c49713f809b5b011b86eb5ff20340ba0 Mon Sep 17 00:00:00 2001 From: Karthik Nadig Date: Fri, 25 Sep 2020 14:09:06 -0700 Subject: [PATCH 2/3] Revert "Do not quote isolated in exec module" This reverts commit b9fa04c06be0876861017eff5ee032ca71acda3d. --- src/client/common/process/internal/python.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/common/process/internal/python.ts b/src/client/common/process/internal/python.ts index ef24d4c6d684..d553e54293c1 100644 --- a/src/client/common/process/internal/python.ts +++ b/src/client/common/process/internal/python.ts @@ -28,7 +28,7 @@ export function execCode(code: string, isolated = true): string[] { export function execModule(name: string, moduleArgs: string[], isolated = true): string[] { const args = ['-m', name, ...moduleArgs]; if (isolated) { - args[0] = ISOLATED; + args[0] = ISOLATED.fileToCommandArgument(); } // "code" isn't specific enough to know how to parse it, // so we only return the args. From 9e12210c1b8e1a2e7fe818edb90c02f250d11bdc Mon Sep 17 00:00:00 2001 From: Karthik Nadig Date: Fri, 25 Sep 2020 14:10:06 -0700 Subject: [PATCH 3/3] Revert "IPyKernel install issue with windows paths (#13667)" This reverts commit 23725abd4249811f24475e215c2d78ed5e508e79. --- src/client/common/process/internal/python.ts | 2 +- src/client/common/process/internal/scripts/index.ts | 2 +- src/test/common/moduleInstaller.test.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/client/common/process/internal/python.ts b/src/client/common/process/internal/python.ts index d553e54293c1..86123367f852 100644 --- a/src/client/common/process/internal/python.ts +++ b/src/client/common/process/internal/python.ts @@ -28,7 +28,7 @@ export function execCode(code: string, isolated = true): string[] { export function execModule(name: string, moduleArgs: string[], isolated = true): string[] { const args = ['-m', name, ...moduleArgs]; if (isolated) { - args[0] = ISOLATED.fileToCommandArgument(); + args[0] = ISOLATED; // replace } // "code" isn't specific enough to know how to parse it, // so we only return the args. diff --git a/src/client/common/process/internal/scripts/index.ts b/src/client/common/process/internal/scripts/index.ts index 74408e81e1e6..ec59c6f6a483 100644 --- a/src/client/common/process/internal/scripts/index.ts +++ b/src/client/common/process/internal/scripts/index.ts @@ -306,7 +306,7 @@ export function shell_exec(command: string, lockfile: string, shellArgs: string[ // We don't bother with a "parse" function since the output // could be anything. return [ - ISOLATED.fileToCommandArgument(), + ISOLATED, script, command.fileToCommandArgument(), // The shell args must come after the command diff --git a/src/test/common/moduleInstaller.test.ts b/src/test/common/moduleInstaller.test.ts index a5bccb537869..abae5cd316a5 100644 --- a/src/test/common/moduleInstaller.test.ts +++ b/src/test/common/moduleInstaller.test.ts @@ -140,7 +140,7 @@ import { closeActiveWindows, initializeTest } from './../initialize'; chai_use(chaiAsPromised); -const isolated = path.join(EXTENSION_ROOT_DIR_FOR_TESTS, 'pythonFiles', 'pyvsc-run-isolated.py').replace(/\\/g, '/'); +const isolated = path.join(EXTENSION_ROOT_DIR_FOR_TESTS, 'pythonFiles', 'pyvsc-run-isolated.py'); const info: PythonEnvironment = { architecture: Architecture.Unknown,