Skip to content

Commit 7a9c69f

Browse files
committed
Clear NODE_OPTIONS to avoid node/electron interception issues
Without this, intercepting old versions of node while using a new desktop app would break, as the server's own options would be used by the subprocess, which would shutdown if they weren't understood.
1 parent 8695100 commit 7a9c69f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/interceptors/terminal/terminal-env-overrides.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,10 @@ export function getTerminalEnvVars(
6767
? `${OVERRIDE_PYTHONPATH}:$PYTHONPATH`
6868
: currentEnv.PYTHONPATH
6969
? `${OVERRIDE_PYTHONPATH}:${currentEnv.PYTHONPATH}`
70-
: OVERRIDE_PYTHONPATH
70+
: OVERRIDE_PYTHONPATH,
71+
72+
// Clear NODE_OPTIONS - it's meant for _us_, not subprocesses.
73+
// Otherwise e.g. --max-http-header-size can break old Node/Electron
74+
NODE_OPTIONS: ""
7175
};
7276
}

0 commit comments

Comments
 (0)