Skip to content

Commit

Permalink
skip PWD and see what I get
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonykim1 committed Feb 20, 2025
1 parent fb4dd1a commit bfe89b8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/client/interpreter/activation/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,8 @@ export class EnvironmentActivationService implements IEnvironmentActivationServi

@cache(-1, true)
public async getProcessEnvironmentVariables(resource: Resource, shell?: string): Promise<EnvironmentVariables> {
// Shell mightve been not gitbash.. Hence messed up path.. lol

// Try to get the process environment variables using Python by printing variables, that can be little different
// from `process.env` and is preferred when calculating diff.
const globalInterpreters = this.interpreterService
Expand Down
2 changes: 2 additions & 0 deletions src/client/terminals/envCollectionActivation/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@ export class TerminalEnvVarCollectionService implements IExtensionActivationServ
envVarCollection.prepend(key, value, defaultPrependOptions);
return;
}
// Avoid setting PWD.
if (key === 'PATH') {
// perhaps PATH is getting messed up
const options = {
Expand Down Expand Up @@ -482,6 +483,7 @@ function shouldSkip(env: string) {
'PYTHONUTF8',
// We have deactivate service which takes care of setting it.
'_OLD_VIRTUAL_PATH',
'PWD',
].includes(env);
}

Expand Down

0 comments on commit bfe89b8

Please sign in to comment.