Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions apps/desktop/src/main/terminal-host/session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,14 +180,11 @@ export class Session {
const shellArgs = this.getShellArgs(this.shell);
const subprocessPath = path.join(__dirname, "pty-subprocess.js");

// Use electron as node to run the subprocess
// Spawn subprocess with filtered env to prevent leaking NODE_ENV etc.
const electronPath = process.execPath;
this.subprocess = spawn(electronPath, [subprocessPath], {
stdio: ["pipe", "pipe", "inherit"], // pipe stdin/stdout, inherit stderr
env: {
...process.env,
ELECTRON_RUN_AS_NODE: "1",
},
stdio: ["pipe", "pipe", "inherit"],
env: { ...processEnv, ELECTRON_RUN_AS_NODE: "1" },
});

// Read framed messages from subprocess stdout
Expand Down
Loading