fix: shell-launch copilot on windows

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Copilot CLI
2026-03-21 10:44:00 +01:00
co-authored by Copilot
parent 2fbb5dc5a5
commit 56c81fe053
4 changed files with 144 additions and 3 deletions
+2 -2
View File
@@ -1,4 +1,4 @@
const blockedEnvironmentKeys = new Set(['ELECTRON_RUN_AS_NODE', 'NODE_OPTIONS']);
const blockedEnvironmentPrefixes = ['BUN_', 'COPILOT_', 'ELECTRON_', 'NODE_', 'NPM_'];
export function createSidecarEnvironment(baseEnvironment: NodeJS.ProcessEnv): NodeJS.ProcessEnv {
const sanitizedEnvironment: NodeJS.ProcessEnv = {};
@@ -6,7 +6,7 @@ export function createSidecarEnvironment(baseEnvironment: NodeJS.ProcessEnv): No
for (const [name, value] of Object.entries(baseEnvironment)) {
const normalizedName = name.toUpperCase();
if (normalizedName.startsWith('COPILOT_') || blockedEnvironmentKeys.has(normalizedName)) {
if (blockedEnvironmentPrefixes.some((prefix) => normalizedName.startsWith(prefix))) {
continue;
}