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
2 changes: 2 additions & 0 deletions src/client/terminals/envCollectionActivation/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ import {
} from '../types';
import { ProgressService } from '../../common/application/progressService';
import { useEnvExtension } from '../../envExt/api.internal';
import { registerPythonStartup } from '../pythonStartup';

@injectable()
export class TerminalEnvVarCollectionService implements IExtensionActivationService, ITerminalEnvVarCollectionService {
Expand Down Expand Up @@ -109,6 +110,7 @@ export class TerminalEnvVarCollectionService implements IExtensionActivationServ
);
this.registeredOnce = true;
}
await registerPythonStartup(this.context);
return;
}
if (!this.registeredOnce) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@
import * as sinon from 'sinon';
import { assert, expect } from 'chai';
import { mock, instance, when, anything, verify, reset } from 'ts-mockito';
import * as TypeMoq from 'typemoq';
import {
EnvironmentVariableCollection,
EnvironmentVariableMutatorOptions,
GlobalEnvironmentVariableCollection,
ProgressLocation,
Uri,
WorkspaceConfiguration,
WorkspaceFolder,
} from 'vscode';
import {
Expand Down Expand Up @@ -55,6 +57,7 @@ suite('Terminal Environment Variable Collection Service', () => {
let terminalEnvVarCollectionService: TerminalEnvVarCollectionService;
let terminalDeactivateService: ITerminalDeactivateService;
let useEnvExtensionStub: sinon.SinonStub;
let pythonConfig: TypeMoq.IMock<WorkspaceConfiguration>;
const progressOptions = {
location: ProgressLocation.Window,
title: Interpreters.activatingTerminals,
Expand Down Expand Up @@ -122,6 +125,8 @@ suite('Terminal Environment Variable Collection Service', () => {
instance(shellIntegrationService),
instance(envVarProvider),
);
pythonConfig = TypeMoq.Mock.ofType<WorkspaceConfiguration>();
pythonConfig.setup((p) => p.get('terminal.shellIntegration.enabled')).returns(() => false);
});

teardown(() => {
Expand Down