@@ -829,12 +829,7 @@ export abstract class BaseExtHostTerminalService extends Disposable implements I
829
829
collection = new EnvironmentVariableCollection ( ) ;
830
830
this . _setEnvironmentVariableCollection ( extension . identifier . value , collection ) ;
831
831
}
832
- return {
833
- ...collection . getScopedEnvironmentVariableCollection ( undefined ) ,
834
- getScopedEnvironmentVariableCollection ( scope ) {
835
- return collection ! . getScopedEnvironmentVariableCollection ( scope ) ;
836
- } ,
837
- } ;
832
+ return collection . getScopedEnvironmentVariableCollection ( undefined ) ;
838
833
}
839
834
840
835
private _syncEnvironmentVariableCollection ( extensionIdentifier : string , collection : EnvironmentVariableCollection ) : void {
@@ -893,7 +888,7 @@ class EnvironmentVariableCollection {
893
888
this . map = new Map ( serialized ) ;
894
889
}
895
890
896
- getScopedEnvironmentVariableCollection ( scope : vscode . EnvironmentVariableScope | undefined ) : vscode . EnvironmentVariableCollection {
891
+ getScopedEnvironmentVariableCollection ( scope : vscode . EnvironmentVariableScope | undefined ) : IDefaultEnvironmentVariableCollection {
897
892
const scopedCollectionKey = this . getScopeKey ( scope ) ;
898
893
let scopedCollection = this . scopedCollections . get ( scopedCollectionKey ) ;
899
894
if ( ! scopedCollection ) {
@@ -1009,7 +1004,7 @@ class EnvironmentVariableCollection {
1009
1004
}
1010
1005
}
1011
1006
1012
- class ScopedEnvironmentVariableCollection implements vscode . EnvironmentVariableCollection {
1007
+ class ScopedEnvironmentVariableCollection implements vscode . EnvironmentVariableCollection , IDefaultEnvironmentVariableCollection {
1013
1008
public get persistent ( ) : boolean { return this . collection . persistent ; }
1014
1009
public set persistent ( value : boolean ) {
1015
1010
this . collection . persistent = value ;
@@ -1024,6 +1019,10 @@ class ScopedEnvironmentVariableCollection implements vscode.EnvironmentVariableC
1024
1019
) {
1025
1020
}
1026
1021
1022
+ getScopedEnvironmentVariableCollection ( ) {
1023
+ return this . collection . getScopedEnvironmentVariableCollection ( this . scope ) ;
1024
+ }
1025
+
1027
1026
replace ( variable : string , value : string ) : void {
1028
1027
this . collection . replace ( variable , value , this . scope ) ;
1029
1028
}
0 commit comments