File tree 2 files changed +10
-8
lines changed
pythonEnvironments/base/info 2 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -70,11 +70,6 @@ export const EMPTY_VERSION: RawBasicVersionInfo = {
70
70
major : - 1 ,
71
71
minor : - 1 ,
72
72
micro : - 1 ,
73
- unnormalized : {
74
- major : undefined ,
75
- minor : undefined ,
76
- micro : undefined ,
77
- } ,
78
73
} ;
79
74
Object . freeze ( EMPTY_VERSION ) ;
80
75
Original file line number Diff line number Diff line change @@ -78,9 +78,16 @@ export function buildEnvInfo(init?: {
78
78
}
79
79
80
80
export function areEnvsDeepEqual ( env1 : PythonEnvInfo , env2 : PythonEnvInfo ) : boolean {
81
- env1 . source = env1 . source . sort ( ) ;
82
- env2 . source = env2 . source . sort ( ) ;
83
- return isEqual ( env1 , env2 ) ;
81
+ const env1Clone = cloneDeep ( env1 ) ;
82
+ const env2Clone = cloneDeep ( env2 ) ;
83
+ // Cannot compare searchLocation as they are Uri objects.
84
+ delete env1Clone . searchLocation ;
85
+ delete env2Clone . searchLocation ;
86
+ env1Clone . source = env1Clone . source . sort ( ) ;
87
+ env2Clone . source = env2Clone . source . sort ( ) ;
88
+ const searchLocation1 = env1 . searchLocation ?. fsPath ?? '' ;
89
+ const searchLocation2 = env2 . searchLocation ?. fsPath ?? '' ;
90
+ return isEqual ( env1Clone , env2Clone ) && arePathsSame ( searchLocation1 , searchLocation2 ) ;
84
91
}
85
92
86
93
/**
You can’t perform that action at this time.
0 commit comments