Skip to content

Commit 06e6f5b

Browse files
author
Kartik Raj
committed
Correct glob pattern to not match python3.2whoa
1 parent ad675c1 commit 06e6f5b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/client/pythonEnvironments/discovery/locators/services/windowsStoreLocator.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,14 +93,16 @@ export async function isWindowsStoreEnvironment(interpreterPath: string): Promis
9393
* This is a glob pattern which matches following file names:
9494
* python3.8.exe
9595
* python3.9.exe
96+
* python3.10.exe
9697
* This pattern does not match:
9798
* python.exe
9899
* python2.7.exe
99100
* python3.exe
100101
* python38.exe
101-
* 'python.exe', 'python3.exe', and 'python3.8.exe' can point to the same executable, hence only capture python3.*.exes.
102+
* Note chokidar fails to match multiple digits using +([0-9]), even though the underlying glob pattern matcher
103+
* they use (picomatch), or any other glob matcher does. Hence why we had to use {[0-9],[0-9][0-9]} instead.
102104
*/
103-
const pythonExeGlob = 'python3\.[0-9]*\.exe';
105+
const pythonExeGlob = 'python3\.{[0-9],[0-9][0-9]}\.exe';
104106

105107
/**
106108
* Checks if a given path ends with python3.*.exe. Not all python executables are matched as

0 commit comments

Comments
 (0)