Skip to content

Commit 68d22e5

Browse files
author
Kartik Raj
committed
Fix for each in scope env collection
1 parent 6243562 commit 68d22e5

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

extensions/vscode-api-tests/src/singlefolder-tests/terminal.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -897,6 +897,7 @@ import { assertNoRpc, poll } from '../utils';
897897
{ value: 'scoped~b2~', type: EnvironmentVariableMutatorType.Append, options: defaultOptions },
898898
{ value: 'scoped~c2~', type: EnvironmentVariableMutatorType.Prepend, options: defaultOptions }
899899
]);
900+
deepStrictEqual(entries.map(v => v[0]), ['A', 'B', 'C']);
900901
});
901902
});
902903
});

src/vs/workbench/api/common/extHostTerminalService.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -980,9 +980,9 @@ class UnifiedEnvironmentVariableCollection {
980980

981981
public getVariableMap(scope: vscode.EnvironmentVariableScope | undefined): Map<string, vscode.EnvironmentVariableMutator> {
982982
const map = new Map<string, vscode.EnvironmentVariableMutator>();
983-
for (const [key, value] of this.map) {
983+
for (const [_, value] of this.map) {
984984
if (this.getScopeKey(value.scope) === this.getScopeKey(scope)) {
985-
map.set(key, convertMutator(value));
985+
map.set(value.variable, convertMutator(value));
986986
}
987987
}
988988
return map;

0 commit comments

Comments
 (0)