Skip to content

Commit 18ebab6

Browse files
vzaidmanmeta-codesync[bot]
authored andcommitted
remove ELECTRON_RUN_AS_NODE instead of setting it to empty string (#54853)
Summary: Pull Request resolved: #54853 Changelog: [Internal] Reviewed By: robhogan Differential Revision: D88951056 fbshipit-source-id: 07138ace1a02e3d5ea8ed36736e4288002773378
1 parent 28d6ba1 commit 18ebab6

1 file changed

Lines changed: 8 additions & 7 deletions

File tree

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

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,17 +47,18 @@ async function unstable_spawnDebuggerShellWithArgs(
4747
);
4848

4949
return new Promise((resolve, reject) => {
50+
const {
51+
// If this package is used in an Electron app (e.g. inside a VS Code extension),
52+
// ELECTRON_RUN_AS_NODE=1 can leak from the parent process.
53+
// Since this is never the right way to launch the Fusebox shell, we guard against it here.
54+
ELECTRON_RUN_AS_NODE: _,
55+
...env
56+
} = process.env;
5057
const child = spawn(binaryPath, [...baseArgs, ...args], {
5158
stdio: 'inherit',
5259
windowsHide: true,
5360
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-
},
61+
env,
6162
});
6263
if (mode === 'detached') {
6364
child.on('spawn', () => {

0 commit comments

Comments
 (0)