Skip to content

Commit 5fd5665

Browse files
committed
drop ELECTRON_RUN_AS_NODE from terminal env
1 parent ad18e48 commit 5fd5665

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

  • packages/workspace-server/src/services/shell

packages/workspace-server/src/services/shell/shell.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,12 @@ function buildShellEnv(
6767
): Record<string, string> {
6868
const env = { ...process.env } as Record<string, string>;
6969

70+
// The workspace-server runs with ELECTRON_RUN_AS_NODE=1, but user-facing
71+
// terminals must not inherit it: it makes any Electron-based CLI the user
72+
// launches run as node instead of its app. The PATH node shim no longer
73+
// needs the ambient var (it is self-contained).
74+
delete env.ELECTRON_RUN_AS_NODE;
75+
7076
if (platform() === "darwin" && !process.env.LC_ALL) {
7177
const locale = process.env.LC_CTYPE || "en_US.UTF-8";
7278
Object.assign(env, {

0 commit comments

Comments
 (0)