Skip to content

Commit 1ca9aa7

Browse files
author
Kartik Raj
authored
Merge pull request microsoft#188982 from microsoft/kartik/detailed-tahr
Fix for each in scope env collection
2 parents da54519 + 68d22e5 commit 1ca9aa7

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
@@ -936,6 +936,7 @@ import { assertNoRpc, poll } from '../utils';
936936
{ value: 'scoped~b2~', type: EnvironmentVariableMutatorType.Append, options: defaultOptions },
937937
{ value: 'scoped~c2~', type: EnvironmentVariableMutatorType.Prepend, options: defaultOptions }
938938
]);
939+
deepStrictEqual(entries.map(v => v[0]), ['A', 'B', 'C']);
939940
});
940941
});
941942
});

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

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

993993
public getVariableMap(scope: vscode.EnvironmentVariableScope | undefined): Map<string, vscode.EnvironmentVariableMutator> {
994994
const map = new Map<string, vscode.EnvironmentVariableMutator>();
995-
for (const [key, value] of this.map) {
995+
for (const [_, value] of this.map) {
996996
if (this.getScopeKey(value.scope) === this.getScopeKey(scope)) {
997-
map.set(key, convertMutator(value));
997+
map.set(value.variable, convertMutator(value));
998998
}
999999
}
10001000
return map;

0 commit comments

Comments
 (0)