@@ -25,7 +25,7 @@ import {
2525import { IInterpreterAutoSelectionService } from '../../interpreter/autoSelection/types' ;
2626import { sleep } from '../utils/async' ;
2727import { traceError } from '../../logging' ;
28- import { getPixiEnvironmentFromInterpreter } from '../../pythonEnvironments/common/environmentManagers/pixi' ;
28+ import { getPixi , getPixiEnvironmentFromInterpreter } from '../../pythonEnvironments/common/environmentManagers/pixi' ;
2929
3030@injectable ( )
3131export class PythonExecutionFactory implements IPythonExecutionFactory {
@@ -80,16 +80,18 @@ export class PythonExecutionFactory implements IPythonExecutionFactory {
8080 }
8181 const processService : IProcessService = await this . processServiceFactory . create ( options . resource ) ;
8282
83+ if ( await getPixi ( ) ) {
84+ const pixiExecutionService = await this . createPixiExecutionService ( pythonPath , processService ) ;
85+ if ( pixiExecutionService ) {
86+ return pixiExecutionService ;
87+ }
88+ }
89+
8390 const condaExecutionService = await this . createCondaExecutionService ( pythonPath , processService ) ;
8491 if ( condaExecutionService ) {
8592 return condaExecutionService ;
8693 }
8794
88- const pixiExecutionService = await this . createPixiExecutionService ( pythonPath , processService ) ;
89- if ( pixiExecutionService ) {
90- return pixiExecutionService ;
91- }
92-
9395 const windowsStoreInterpreterCheck = this . pyenvs . isMicrosoftStoreInterpreter . bind ( this . pyenvs ) ;
9496
9597 const env = ( await windowsStoreInterpreterCheck ( pythonPath ) )
@@ -122,16 +124,18 @@ export class PythonExecutionFactory implements IPythonExecutionFactory {
122124 processService . on ( 'exec' , this . logger . logProcess . bind ( this . logger ) ) ;
123125 this . disposables . push ( processService ) ;
124126
127+ if ( await getPixi ( ) ) {
128+ const pixiExecutionService = await this . createPixiExecutionService ( pythonPath , processService ) ;
129+ if ( pixiExecutionService ) {
130+ return pixiExecutionService ;
131+ }
132+ }
133+
125134 const condaExecutionService = await this . createCondaExecutionService ( pythonPath , processService ) ;
126135 if ( condaExecutionService ) {
127136 return condaExecutionService ;
128137 }
129138
130- const pixiExecutionService = await this . createPixiExecutionService ( pythonPath , processService ) ;
131- if ( pixiExecutionService ) {
132- return pixiExecutionService ;
133- }
134-
135139 const env = createPythonEnv ( pythonPath , processService , this . fileSystem ) ;
136140 return createPythonService ( processService , env ) ;
137141 }
0 commit comments