Skip to content

Commit 6aea4eb

Browse files
committed
Add envMixin to in Windows
1 parent 46f9aab commit 6aea4eb

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/vs/platform/terminal/node/terminalEnvironment.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,9 @@ export function getShellIntegrationInjection(
118118
const shell = process.platform === 'win32' ? path.basename(shellLaunchConfig.executable).toLowerCase() : path.basename(shellLaunchConfig.executable);
119119
const appRoot = path.dirname(FileAccess.asFileUri('', require).fsPath);
120120
let newArgs: string[] | undefined;
121+
const envMixin: IProcessEnvironment = {
122+
'VSCODE_INJECTION': '1'
123+
};
121124

122125
// Windows
123126
if (isWindows) {
@@ -134,16 +137,13 @@ export function getShellIntegrationInjection(
134137
newArgs = [...newArgs]; // Shallow clone the array to avoid setting the default array
135138
newArgs[newArgs.length - 1] = format(newArgs[newArgs.length - 1], appRoot, '');
136139
}
137-
return { newArgs };
140+
return { newArgs, envMixin };
138141
}
139142
logService.warn(`Shell integration cannot be enabled for executable "${shellLaunchConfig.executable}" and args`, shellLaunchConfig.args);
140143
return undefined;
141144
}
142145

143146
// Linux & macOS
144-
const envMixin: IProcessEnvironment = {
145-
'VSCODE_INJECTION': '1'
146-
};
147147
switch (shell) {
148148
case 'bash': {
149149
if (!originalArgs || originalArgs.length === 0) {

0 commit comments

Comments
 (0)