From a764a481f3dc644e844e311415f11a6a66be203a Mon Sep 17 00:00:00 2001 From: Chris LaFreniere <40371649+chlafreniere@users.noreply.github.com> Date: Thu, 21 Feb 2019 11:54:08 -1000 Subject: [PATCH] Ensure that we preserve rest of PATH when starting Jupyter (#4109) --- extensions/notebook/src/jupyter/serverInstance.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/notebook/src/jupyter/serverInstance.ts b/extensions/notebook/src/jupyter/serverInstance.ts index 6592069775..d81fdfb8ae 100644 --- a/extensions/notebook/src/jupyter/serverInstance.ts +++ b/extensions/notebook/src/jupyter/serverInstance.ts @@ -354,8 +354,8 @@ export class PerNotebookServerInstance implements IServerInstance { let env = this.getEnvWithConfigPaths(); // Setting the PATH variable here for the jupyter command. Apparently setting it above will cause the // notebook process to die even though we don't override it with the for loop logic above. - delete env['Path']; - env['PATH'] = install.pythonEnvVarPath; + let pathVariableSeparator = process.platform === 'win32' ? ';' : ':'; + env['PATH'] = install.pythonEnvVarPath + pathVariableSeparator + env['PATH']; // 'MSHOST_TELEMETRY_ENABLED' and 'MSHOST_ENVIRONMENT' environment variables are set // for telemetry purposes used by PROSE in the process where the Jupyter kernel runs