File tree Expand file tree Collapse file tree 3 files changed +15
-0
lines changed
common/terminal/environmentActivationProviders
pythonEnvironments/common/environmentManagers Expand file tree Collapse file tree 3 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -60,6 +60,11 @@ export class CondaActivationCommandProvider implements ITerminalActivationComman
6060
6161 const condaEnv = envInfo . name . length > 0 ? envInfo . name : envInfo . path ;
6262
63+ // Directly use the self-contained micromamba executable.
64+ if ( await this . condaService . isMicroMamba ( ) ) {
65+ return [ `micromamba activate ${ condaEnv . toCommandArgumentForPythonExt ( ) } ` ] ;
66+ }
67+
6368 // New version.
6469 const interpreterPath = await this . condaService . getInterpreterPathForEnvironment ( envInfo ) ;
6570 const activatePath = await this . condaService . getActivationScriptFromInterpreter ( interpreterPath , envInfo . name ) ;
Original file line number Diff line number Diff line change @@ -62,6 +62,7 @@ export interface ICondaService {
6262 getCondaFile ( forShellExecution ?: boolean ) : Promise < string > ;
6363 getCondaInfo ( ) : Promise < CondaInfo | undefined > ;
6464 isCondaAvailable ( ) : Promise < boolean > ;
65+ isMicroMamba ( ) : Promise < boolean > ;
6566 getCondaVersion ( ) : Promise < SemVer | undefined > ;
6667 getInterpreterPathForEnvironment ( condaEnv : CondaEnvironmentInfo ) : Promise < string | undefined > ;
6768 getCondaFileFromInterpreter ( interpreterPath ?: string , envName ?: string ) : Promise < string | undefined > ;
Original file line number Diff line number Diff line change @@ -82,6 +82,15 @@ export class CondaService implements ICondaService {
8282 . catch ( ( ) => ( this . isAvailable = false ) ) ; // eslint-disable-line no-return-assign
8383 }
8484
85+ /**
86+ * Is the conda executable named "micromamba"?
87+ */
88+ public async isMicroMamba ( ) : Promise < boolean > {
89+ const file = await this . getCondaFile ( ) ;
90+ const name = path . basename ( file , '.exe' ) ;
91+ return name === 'micromamba' ;
92+ }
93+
8594 /**
8695 * Return the conda version.
8796 */
You can’t perform that action at this time.
0 commit comments