Skip to content

Commit

Permalink
disable applyAtShellIntegration entirely
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonykim1 committed Feb 19, 2025
1 parent 738dece commit 65812c9
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/client/terminals/envCollectionActivation/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,9 @@ export class TerminalEnvVarCollectionService implements IExtensionActivationServ
return;
}
if (key === 'PATH') {
// perhaps PATH is getting messed up
const options = {
applyAtShellIntegration: true,
applyAtShellIntegration: false,
applyAtProcessCreation: true,
};
if (processEnv.PATH && env.PATH?.endsWith(processEnv.PATH)) {
Expand Down Expand Up @@ -278,7 +279,7 @@ export class TerminalEnvVarCollectionService implements IExtensionActivationServ
return;
}
const options = {
applyAtShellIntegration: true,
applyAtShellIntegration: false,
applyAtProcessCreation: true,
};
traceLog(
Expand Down Expand Up @@ -409,7 +410,7 @@ export class TerminalEnvVarCollectionService implements IExtensionActivationServ
envVarCollection.replace(
'PATH',
`${path.dirname(interpreter.path)}${path.delimiter}${process.env[pathVarName]}`,
{ applyAtShellIntegration: true, applyAtProcessCreation: true },
{ applyAtShellIntegration: false, applyAtProcessCreation: true },
);
return;
}
Expand All @@ -426,11 +427,11 @@ export class TerminalEnvVarCollectionService implements IExtensionActivationServ
// TODO: Stop prepending altogether once https://github.com/microsoft/vscode/issues/145234 is available.
return isActive
? {
applyAtShellIntegration: true,
applyAtShellIntegration: false,
applyAtProcessCreation: false,
}
: {
applyAtShellIntegration: true, // Takes care of false negatives in case manual integration is being used.
applyAtShellIntegration: false, // Takes care of false negatives in case manual integration is being used.
applyAtProcessCreation: true,
};
}
Expand Down

0 comments on commit 65812c9

Please sign in to comment.