Skip to content

Commit 2b92283

Browse files
vzaidmanfacebook-github-bot
authored andcommitted
make the default debugger-shell spawn command unset ELECTRON_RUN_AS_NODE
Summary: make the default debugger-shell spawn command unset ELECTRON_RUN_AS_NODE Changelog: [Internal] Reviewed By: motiz88 Differential Revision: D86673603
1 parent ffc197e commit 2b92283

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

packages/debugger-shell/src/node/index.flow.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,13 @@ async function unstable_spawnDebuggerShellWithArgs(
5151
stdio: 'inherit',
5252
windowsHide: true,
5353
detached: mode === 'detached',
54+
env: {
55+
...process.env,
56+
// If this package is used in an Electron app (e.g. inside a VS Code extension),
57+
// ELECTRON_RUN_AS_NODE=1 can leak from the parent process.
58+
// Since this is never the right way to launch the Fusebox shell, we guard against it here.
59+
ELECTRON_RUN_AS_NODE: '',
60+
},
5461
});
5562
if (mode === 'detached') {
5663
child.on('spawn', () => {

0 commit comments

Comments
 (0)