Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/client/terminals/envCollectionActivation/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,9 @@ export class TerminalEnvVarCollectionService implements IExtensionActivationServ
envVarCollection.description = description;

await this.trackTerminalPrompt(shell, resource, env);
await this.terminalDeactivateService.initializeScriptParams(shell);
await this.terminalDeactivateService.initializeScriptParams(shell).catch((ex) => {
traceError(`Failed to initialize deactivate script`, shell, ex);
});
}

private isPromptSet = new Map<number | undefined, boolean>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,7 @@ suite('Terminal Environment Variable Collection Service', () => {

test('Also prepend deactivate script location if available', async () => {
reset(terminalDeactivateService);
when(terminalDeactivateService.initializeScriptParams(anything())).thenResolve();
when(terminalDeactivateService.getScriptLocation(anything(), anything())).thenResolve('scriptLocation');
const processEnv = { PATH: 'hello/1/2/3' };
reset(environmentActivationService);
Expand Down Expand Up @@ -409,6 +410,7 @@ suite('Terminal Environment Variable Collection Service', () => {

test('Prepend full PATH with separator otherwise', async () => {
reset(terminalDeactivateService);
when(terminalDeactivateService.initializeScriptParams(anything())).thenResolve();
when(terminalDeactivateService.getScriptLocation(anything(), anything())).thenResolve('scriptLocation');
const processEnv = { PATH: 'hello/1/2/3' };
reset(environmentActivationService);
Expand Down