From 9cced6a42384f34ce4aae3de4529ab0d4b2288bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20P=C5=99evr=C3=A1til?= Date: Thu, 3 Oct 2024 19:17:48 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Explicitly=20unset=20Python=20en?= =?UTF-8?q?v=20vars=20in=20shell?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/installers/conda.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/installers/conda.ts b/src/installers/conda.ts index 23b74f0..ae50249 100644 --- a/src/installers/conda.ts +++ b/src/installers/conda.ts @@ -41,7 +41,7 @@ export class CondaInstaller implements Installer { if (process.platform === 'win32') { this.activateCommand = - '"' + + 'set "PYTHONPATH=" && set "PYTHONHOME=" && set "PYTHONSTARTUP=" && "' + path.join( context.globalStorageUri.fsPath, 'wake-conda', @@ -52,7 +52,7 @@ export class CondaInstaller implements Installer { this.shell = 'cmd.exe'; } else { this.activateCommand = - '. "' + + 'unset PYTHONPATH && unset PYTHONHOME && unset PYTHONSTARTUP && . "' + path.join(context.globalStorageUri.fsPath, 'wake-conda', 'bin', 'activate') + '"'; this.shell = '/bin/bash'; @@ -356,6 +356,7 @@ export class CondaInstaller implements Installer { delete env.PYTHONPATH; delete env.PYTHONHOME; + delete env.PYTHONSTARTUP; this.outputChannel.appendLine( `Running '${this.activateCommand} && wake lsp --port ${port}'`