Skip to content

Commit

Permalink
🐛 Explicitly unset Python env vars in shell
Browse files Browse the repository at this point in the history
  • Loading branch information
michprev committed Oct 3, 2024
1 parent 4fc8273 commit 9cced6a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/installers/conda.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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';
Expand Down Expand Up @@ -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}'`
Expand Down

0 comments on commit 9cced6a

Please sign in to comment.