File tree 1 file changed +8
-0
lines changed
src/client/pythonEnvironments/base/locators/lowLevel 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change
1
+ /* eslint-disable no-continue */
1
2
// Copyright (c) Microsoft Corporation. All rights reserved.
2
3
// Licensed under the MIT License.
3
4
4
5
import { PythonEnvKind , PythonEnvSource } from '../../info' ;
5
6
import { BasicEnvInfo , IPythonEnvsIterator , Locator } from '../../locator' ;
6
7
import { getRegistryInterpreters } from '../../../common/windowsUtils' ;
7
8
import { traceError } from '../../../../logging' ;
9
+ import { isMicrosoftStoreDir } from '../../../common/environmentManagers/microsoftStoreEnv' ;
8
10
9
11
export class WindowsRegistryLocator extends Locator < BasicEnvInfo > {
10
12
public readonly providerId : string = 'windows-registry' ;
@@ -15,6 +17,12 @@ export class WindowsRegistryLocator extends Locator<BasicEnvInfo> {
15
17
const interpreters = await getRegistryInterpreters ( ) ;
16
18
for ( const interpreter of interpreters ) {
17
19
try {
20
+ // Filter out Microsoft Store app directories. We have a store app locator that handles this.
21
+ // The python.exe available in these directories might not be python. It can be a store install
22
+ // shortcut that takes you to microsoft store.
23
+ if ( isMicrosoftStoreDir ( interpreter . interpreterPath ) ) {
24
+ continue ;
25
+ }
18
26
const env : BasicEnvInfo = {
19
27
kind : PythonEnvKind . OtherGlobal ,
20
28
executablePath : interpreter . interpreterPath ,
You can’t perform that action at this time.
0 commit comments