Skip to content

Commit a4a2c7a

Browse files
author
Kartik Raj
authored
Do not display workspace related envs if no workspace is open (#17358)
* Do not display workspace related envs if no workspace is open * News
1 parent 1fa5490 commit a4a2c7a

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

news/2 Fixes/17358.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Do not display workspace related envs if no workspace is open.

src/client/pythonEnvironments/legacyIOC.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,9 +303,12 @@ class ComponentAdapter implements IComponentAdapter {
303303
if (wsFolder !== undefined) {
304304
query.searchLocations = {
305305
roots: [wsFolder.uri],
306-
doNotIncludeNonRooted: false,
307306
};
308307
}
308+
} else {
309+
query.searchLocations = {
310+
roots: [],
311+
};
309312
}
310313

311314
let envs = this.api.getEnvs(query);

0 commit comments

Comments
 (0)