diff --git a/src/common/localize.ts b/src/common/localize.ts index e099463d..dd7c637f 100644 --- a/src/common/localize.ts +++ b/src/common/localize.ts @@ -168,6 +168,9 @@ export namespace CondaStrings { export const condaMissingPythonNoFix = l10n.t( 'No Python found in the selected conda environment. Please select another environment or install Python manually.', ); + export const condaCondaPrefixActive = l10n.t( + 'CONDA_PREFIX is set for this VS Code session. Selection saved for new terminals only.', + ); } export namespace PyenvStrings { diff --git a/src/extension.ts b/src/extension.ts index 75c60395..b03c5132 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -494,8 +494,9 @@ export async function activate(context: ExtensionContext): Promise { + if (process.env.CONDA_PREFIX) { + return process.env.CONDA_PREFIX; + } + const state = await getWorkspacePersistentState(); const data: { [key: string]: string } | undefined = await state.get(CONDA_WORKSPACE_KEY); if (data) {