File tree Expand file tree Collapse file tree
src/client/pythonEnvironments/common/environmentManagers Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -269,11 +269,11 @@ export class Conda {
269269 private static async locate ( ) : Promise < Conda | undefined > {
270270 traceVerbose ( `Searching for conda.` ) ;
271271 const home = getUserHomeDir ( ) ;
272+ const customCondaPath = getPythonSetting < string > ( CONDAPATH_SETTING_KEY ) ;
272273 const suffix = getOSType ( ) === OSType . Windows ? 'Scripts\\conda.exe' : 'bin/conda' ;
273274
274275 // Produce a list of candidate binaries to be probed by exec'ing them.
275276 async function * getCandidates ( ) {
276- const customCondaPath = getPythonSetting < string > ( CONDAPATH_SETTING_KEY ) ;
277277 if ( customCondaPath && customCondaPath !== 'conda' ) {
278278 // If user has specified a custom conda path, use it first.
279279 yield customCondaPath ;
@@ -369,8 +369,9 @@ export class Conda {
369369 let conda = new Conda ( condaPath ) ;
370370 try {
371371 await conda . getInfo ( ) ;
372- if ( getOSType ( ) === OSType . Windows ) {
372+ if ( getOSType ( ) === OSType . Windows && ( isTestExecution ( ) || condaPath !== customCondaPath ) ) {
373373 // Prefer to use .bat files over .exe on windows as that is what cmd works best on.
374+ // Do not translate to `.bat` file if the setting explicitly sets the executable.
374375 const condaBatFile = await getCondaBatFile ( condaPath ) ;
375376 try {
376377 if ( condaBatFile ) {
You can’t perform that action at this time.
0 commit comments