remove ELECTRON_RUN_AS_NODE instead of setting it to empty string (#54853)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/54853

Changelog: [Internal]

Reviewed By: robhogan

Differential Revision: D88951056

fbshipit-source-id: 07138ace1a02e3d5ea8ed36736e4288002773378
This commit is contained in:
Vitali Zaidman authored and meta-codesync[bot] committed 2025-12-11 12:20:20 -08:00
1 parent 28d6ba1a78
commit 18ebab60bc
1 file changed
+8 -7
@@ -47,17 +47,18 @@ async function unstable_spawnDebuggerShellWithArgs(
);
return new Promise((resolve, reject) => {
const {
// If this package is used in an Electron app (e.g. inside a VS Code extension),
// ELECTRON_RUN_AS_NODE=1 can leak from the parent process.
// Since this is never the right way to launch the Fusebox shell, we guard against it here.
ELECTRON_RUN_AS_NODE: _,
...env
} = process.env;
const child = spawn(binaryPath, [...baseArgs, ...args], {
stdio: 'inherit',
windowsHide: true,
detached: mode === 'detached',
env: {
...process.env,
// If this package is used in an Electron app (e.g. inside a VS Code extension),
// ELECTRON_RUN_AS_NODE=1 can leak from the parent process.
// Since this is never the right way to launch the Fusebox shell, we guard against it here.
ELECTRON_RUN_AS_NODE: '',
},
env,
});
if (mode === 'detached') {
child.on('spawn', () => {