File tree 1 file changed +5
-4
lines changed
src/client/pythonEnvironments/base/locators/common
1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ export interface NativeEnvManagerInfo {
49
49
export interface NativeGlobalPythonFinder extends Disposable {
50
50
resolve ( executable : string ) : Promise < NativeEnvInfo > ;
51
51
refresh ( ) : AsyncIterable < NativeEnvInfo > ;
52
- categoryToKind ( category : string ) : PythonEnvKind ;
52
+ categoryToKind ( category ? : string ) : PythonEnvKind ;
53
53
}
54
54
55
55
interface NativeLog {
@@ -79,7 +79,10 @@ class NativeGlobalPythonFinderImpl extends DisposableBase implements NativeGloba
79
79
return environment ;
80
80
}
81
81
82
- categoryToKind ( category : string ) : PythonEnvKind {
82
+ categoryToKind ( category ?: string ) : PythonEnvKind {
83
+ if ( ! category ) {
84
+ return PythonEnvKind . Unknown ;
85
+ }
83
86
switch ( category . toLowerCase ( ) ) {
84
87
case 'conda' :
85
88
return PythonEnvKind . Conda ;
@@ -109,8 +112,6 @@ class NativeGlobalPythonFinderImpl extends DisposableBase implements NativeGloba
109
112
return PythonEnvKind . VirtualEnvWrapper ;
110
113
case 'windowsstore' :
111
114
return PythonEnvKind . MicrosoftStore ;
112
- case 'unknown' :
113
- return PythonEnvKind . Unknown ;
114
115
default : {
115
116
this . outputChannel . info ( `Unknown Python Environment category '${ category } ' from Native Locator.` ) ;
116
117
return PythonEnvKind . Unknown ;
You can’t perform that action at this time.
0 commit comments