diff --git a/news/2 Fixes/17303.md b/news/2 Fixes/17303.md new file mode 100644 index 000000000000..b995c190008f --- /dev/null +++ b/news/2 Fixes/17303.md @@ -0,0 +1 @@ +Ensure we trigger discovery for the first time as part of extension activation. diff --git a/src/client/pythonEnvironments/base/locators/composite/envsCollectionService.ts b/src/client/pythonEnvironments/base/locators/composite/envsCollectionService.ts index 49d95f55bd97..61eb61a451d1 100644 --- a/src/client/pythonEnvironments/base/locators/composite/envsCollectionService.ts +++ b/src/client/pythonEnvironments/base/locators/composite/envsCollectionService.ts @@ -55,6 +55,9 @@ export class EnvsCollectionService extends PythonEnvsWatcher { }; } - addItemsToRunAfterActivation(() => { - // Force an initial background refresh of the environments. - api.triggerRefresh().ignoreErrors(); - }); + // Force an initial background refresh of the environments. + api.triggerRefresh().ignoreErrors(); return { fullyReady: Promise.resolve(),