Skip to content

Commit 865d6c2

Browse files
committed
add exp setting for envs ext
1 parent 01d872b commit 865d6c2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/client/envExt/api.internal.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import {
1414
} from './types';
1515
import { executeCommand } from '../common/vscodeApis/commandApis';
1616
import { IInterpreterPathService } from '../common/types';
17+
import { getConfiguration } from '../common/vscodeApis/workspaceApis';
1718

1819
export const ENVS_EXTENSION_ID = 'ms-python.vscode-python-envs';
1920

@@ -22,7 +23,9 @@ export function useEnvExtension(): boolean {
2223
if (_useExt !== undefined) {
2324
return _useExt;
2425
}
25-
_useExt = !!getExtension(ENVS_EXTENSION_ID);
26+
const inExpSetting = getConfiguration('python').get<boolean>('useEnvironmentsExtension', false);
27+
// If extension is installed and in experiment, then use it.
28+
_useExt = !!getExtension(ENVS_EXTENSION_ID) && inExpSetting;
2629
return _useExt;
2730
}
2831

0 commit comments

Comments
 (0)