@@ -23,7 +23,7 @@ import { CondaStrings } from '../../common/localize';
2323import { traceError } from '../../common/logging' ;
2424import { createDeferred , Deferred } from '../../common/utils/deferred' ;
2525import { normalizePath } from '../../common/utils/pathUtils' ;
26- import { showErrorMessage , withProgress } from '../../common/window.apis' ;
26+ import { showErrorMessage , showInformationMessage , withProgress } from '../../common/window.apis' ;
2727import { NativePythonFinder } from '../common/nativePythonFinder' ;
2828import { CondaSourcingStatus } from './condaSourcingUtils' ;
2929import {
@@ -289,6 +289,16 @@ export class CondaEnvManager implements EnvironmentManager, Disposable {
289289 const folder = this . api . getPythonProject ( scope ) ;
290290 const fsPath = folder ?. uri ?. fsPath ?? scope . fsPath ;
291291 if ( fsPath ) {
292+ // Notify user if CONDA_PREFIX is set and they're trying to select a different environment
293+ if ( process . env . CONDA_PREFIX && checkedEnv ) {
294+ const condaPrefixPath = process . env . CONDA_PREFIX ;
295+ const selectedPath = checkedEnv . environmentPath . fsPath ;
296+ // Only show notification if they selected a different environment
297+ if ( condaPrefixPath !== selectedPath ) {
298+ showInformationMessage ( CondaStrings . condaCondaPrefixActive ) ;
299+ }
300+ }
301+
292302 const normalizedFsPath = normalizePath ( fsPath ) ;
293303 if ( checkedEnv ) {
294304 this . fsPathToEnv . set ( normalizedFsPath , checkedEnv ) ;
0 commit comments