File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
src/client/pythonEnvironments Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ import { asyncFilter } from '../common/utils/arrayUtils';
2626import { CondaEnvironmentInfo , isCondaEnvironment } from './common/environmentManagers/conda' ;
2727import { isMicrosoftStoreEnvironment } from './common/environmentManagers/microsoftStoreEnv' ;
2828import { CondaService } from './common/environmentManagers/condaService' ;
29- import { traceVerbose } from '../logging' ;
29+ import { traceError , traceVerbose } from '../logging' ;
3030
3131const convertedKinds = new Map (
3232 Object . entries ( {
@@ -159,11 +159,16 @@ class ComponentAdapter implements IComponentAdapter {
159159
160160 // We use the same getInterpreters() here as for IInterpreterLocatorService.
161161 public async getInterpreterDetails ( pythonPath : string ) : Promise < PythonEnvironment | undefined > {
162- const env = await this . api . resolveEnv ( pythonPath ) ;
163- if ( ! env ) {
162+ try {
163+ const env = await this . api . resolveEnv ( pythonPath ) ;
164+ if ( ! env ) {
165+ return undefined ;
166+ }
167+ return convertEnvInfo ( env ) ;
168+ } catch ( ex ) {
169+ traceError ( `Failed to resolve interpreter: ${ pythonPath } ` , ex ) ;
164170 return undefined ;
165171 }
166- return convertEnvInfo ( env ) ;
167172 }
168173
169174 // Implements ICondaService
You can’t perform that action at this time.
0 commit comments