File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
src/client/pythonEnvironments/common/environmentManagers Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -269,11 +269,11 @@ export class Conda {
269
269
private static async locate ( ) : Promise < Conda | undefined > {
270
270
traceVerbose ( `Searching for conda.` ) ;
271
271
const home = getUserHomeDir ( ) ;
272
+ const customCondaPath = getPythonSetting < string > ( CONDAPATH_SETTING_KEY ) ;
272
273
const suffix = getOSType ( ) === OSType . Windows ? 'Scripts\\conda.exe' : 'bin/conda' ;
273
274
274
275
// Produce a list of candidate binaries to be probed by exec'ing them.
275
276
async function * getCandidates ( ) {
276
- const customCondaPath = getPythonSetting < string > ( CONDAPATH_SETTING_KEY ) ;
277
277
if ( customCondaPath && customCondaPath !== 'conda' ) {
278
278
// If user has specified a custom conda path, use it first.
279
279
yield customCondaPath ;
@@ -369,8 +369,9 @@ export class Conda {
369
369
let conda = new Conda ( condaPath ) ;
370
370
try {
371
371
await conda . getInfo ( ) ;
372
- if ( getOSType ( ) === OSType . Windows ) {
372
+ if ( getOSType ( ) === OSType . Windows && ( isTestExecution ( ) || condaPath !== customCondaPath ) ) {
373
373
// 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.
374
375
const condaBatFile = await getCondaBatFile ( condaPath ) ;
375
376
try {
376
377
if ( condaBatFile ) {
You can’t perform that action at this time.
0 commit comments