|
2 | 2 | import * as _ from 'lodash';
|
3 | 3 | import { Disposable, Uri, workspace } from 'vscode';
|
4 | 4 | import { RegistryImplementation } from '../../common/registry';
|
5 |
| -import { areBasePathsSame, arePathsSame, Is_64Bit, IS_WINDOWS } from '../../common/utils'; |
| 5 | +import { arePathsSame, Is_64Bit, IS_WINDOWS } from '../../common/utils'; |
6 | 6 | import { IInterpreterLocatorService, PythonInterpreter } from '../contracts';
|
7 |
| -import { IInterpreterVersionService, InterpreterVersionService } from '../interpreterVersion'; |
| 7 | +import { InterpreterVersionService } from '../interpreterVersion'; |
8 | 8 | import { VirtualEnvironmentManager } from '../virtualEnvs';
|
9 | 9 | import { fixInterpreterDisplayName, fixInterpreterPath } from './helpers';
|
10 | 10 | import { CondaEnvFileService, getEnvironmentsFile as getCondaEnvFile } from './services/condaEnvFileService';
|
@@ -46,16 +46,15 @@ export class PythonInterpreterLocatorService implements IInterpreterLocatorServi
|
46 | 46 | }
|
47 | 47 | private async getInterpretersPerResource(resource?: Uri) {
|
48 | 48 | const locators = this.getLocators(resource);
|
49 |
| - const promises = locators.map(provider => provider.getInterpreters(resource)); |
| 49 | + const promises = locators.map(async provider => provider.getInterpreters(resource)); |
50 | 50 | const listOfInterpreters = await Promise.all(promises);
|
51 | 51 |
|
52 | 52 | // tslint:disable-next-line:underscore-consistent-invocation
|
53 | 53 | return _.flatten(listOfInterpreters)
|
54 | 54 | .map(fixInterpreterDisplayName)
|
55 | 55 | .map(fixInterpreterPath)
|
56 | 56 | .reduce<PythonInterpreter[]>((accumulator, current) => {
|
57 |
| - if (accumulator.findIndex(item => arePathsSame(item.path, current.path)) === -1 && |
58 |
| - accumulator.findIndex(item => areBasePathsSame(item.path, current.path)) === -1) { |
| 57 | + if (accumulator.findIndex(item => arePathsSame(item.path, current.path)) === -1) { |
59 | 58 | accumulator.push(current);
|
60 | 59 | }
|
61 | 60 | return accumulator;
|
|
0 commit comments