From 51e1e6977d85ad0ca2f21a487e854ffff6dbe287 Mon Sep 17 00:00:00 2001 From: Karthik Nadig Date: Tue, 11 Jun 2024 18:28:17 -0700 Subject: [PATCH] Restore computing version in legacy locators (#23596) Fixes https://github.com/microsoft/vscode-python/issues/23580 --- .../base/locators/composite/resolverUtils.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/client/pythonEnvironments/base/locators/composite/resolverUtils.ts b/src/client/pythonEnvironments/base/locators/composite/resolverUtils.ts index d1ad91493eab..079ed108ee54 100644 --- a/src/client/pythonEnvironments/base/locators/composite/resolverUtils.ts +++ b/src/client/pythonEnvironments/base/locators/composite/resolverUtils.ts @@ -147,7 +147,7 @@ async function resolveGloballyInstalledEnv(env: BasicEnvInfo): Promise { const { executablePath, kind } = env; const envInfo = buildEnvInfo({ kind, - version: env.version ?? (await getPythonVersionFromPath(executablePath)), + version: await getPythonVersionFromPath(executablePath), executable: executablePath, sysPrefix: env.envPath, location: env.envPath, @@ -243,7 +243,7 @@ async function resolveCondaEnv(env: BasicEnvInfo): Promise { } else { executable = await conda.getInterpreterPathForEnvironment({ prefix: envPath }); } - const version = env.version ?? (executable ? await getPythonVersionFromPath(executable) : undefined); + const version = executable ? await getPythonVersionFromPath(executable) : undefined; const info = buildEnvInfo({ executable, kind: PythonEnvKind.Conda,