File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
src/client/pythonEnvironments/base/locators/common Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ export interface NativeEnvManagerInfo {
4949export interface NativeGlobalPythonFinder extends Disposable {
5050 resolve ( executable : string ) : Promise < NativeEnvInfo > ;
5151 refresh ( ) : AsyncIterable < NativeEnvInfo > ;
52- categoryToKind ( category : string ) : PythonEnvKind ;
52+ categoryToKind ( category ? : string ) : PythonEnvKind ;
5353}
5454
5555interface NativeLog {
@@ -79,7 +79,10 @@ class NativeGlobalPythonFinderImpl extends DisposableBase implements NativeGloba
7979 return environment ;
8080 }
8181
82- categoryToKind ( category : string ) : PythonEnvKind {
82+ categoryToKind ( category ?: string ) : PythonEnvKind {
83+ if ( ! category ) {
84+ return PythonEnvKind . Unknown ;
85+ }
8386 switch ( category . toLowerCase ( ) ) {
8487 case 'conda' :
8588 return PythonEnvKind . Conda ;
@@ -109,8 +112,6 @@ class NativeGlobalPythonFinderImpl extends DisposableBase implements NativeGloba
109112 return PythonEnvKind . VirtualEnvWrapper ;
110113 case 'windowsstore' :
111114 return PythonEnvKind . MicrosoftStore ;
112- case 'unknown' :
113- return PythonEnvKind . Unknown ;
114115 default : {
115116 this . outputChannel . info ( `Unknown Python Environment category '${ category } ' from Native Locator.` ) ;
116117 return PythonEnvKind . Unknown ;
You can’t perform that action at this time.
0 commit comments