diff --git a/src/client/terminals/envCollectionActivation/service.ts b/src/client/terminals/envCollectionActivation/service.ts index b9a9fc17b3d5..4bce814576bb 100644 --- a/src/client/terminals/envCollectionActivation/service.ts +++ b/src/client/terminals/envCollectionActivation/service.ts @@ -188,7 +188,7 @@ export class TerminalEnvVarCollectionService implements IExtensionActivationServ // PS1 in some cases is a shell variable (not an env variable) so "env" might not contain it, calculate it in that case. env.PS1 = await this.getPS1(shell, resource, env); - const prependOptions = await this.getPrependOptions(shell); + const prependOptions = await this.getPrependOptions(); // Clear any previously set env vars from collection envVarCollection.clear(); @@ -345,8 +345,8 @@ export class TerminalEnvVarCollectionService implements IExtensionActivationServ } } - private async getPrependOptions(shell: string): Promise { - const isActive = await this.shellIntegrationService.isWorking(shell); + private async getPrependOptions(): Promise { + const isActive = await this.shellIntegrationService.isWorking(this.applicationEnvironment.shell); // Ideally we would want to prepend exactly once, either at shell integration or process creation. // TODO: Stop prepending altogether once https://github.com/microsoft/vscode/issues/145234 is available. return isActive