mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 13:00:58 +00:00
Fix for each in scope env collection
This commit is contained in:
parent
6243562032
commit
68d22e586d
|
@ -897,6 +897,7 @@ import { assertNoRpc, poll } from '../utils';
|
|||
{ value: 'scoped~b2~', type: EnvironmentVariableMutatorType.Append, options: defaultOptions },
|
||||
{ value: 'scoped~c2~', type: EnvironmentVariableMutatorType.Prepend, options: defaultOptions }
|
||||
]);
|
||||
deepStrictEqual(entries.map(v => v[0]), ['A', 'B', 'C']);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -980,9 +980,9 @@ class UnifiedEnvironmentVariableCollection {
|
|||
|
||||
public getVariableMap(scope: vscode.EnvironmentVariableScope | undefined): Map<string, vscode.EnvironmentVariableMutator> {
|
||||
const map = new Map<string, vscode.EnvironmentVariableMutator>();
|
||||
for (const [key, value] of this.map) {
|
||||
for (const [_, value] of this.map) {
|
||||
if (this.getScopeKey(value.scope) === this.getScopeKey(scope)) {
|
||||
map.set(key, convertMutator(value));
|
||||
map.set(value.variable, convertMutator(value));
|
||||
}
|
||||
}
|
||||
return map;
|
||||
|
|
Loading…
Reference in a new issue