We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0a5b939 commit b331d54Copy full SHA for b331d54
src/interceptors/terminal/terminal-env-overrides.ts
@@ -73,6 +73,11 @@ export function getTerminalEnvVars(
73
// We use $NODE_OPTIONS to prepend our script into node. Notably this also
74
// clears it, which is important, as _our_ NODE_OPTIONS aren't meant for
75
// subprocesses. Otherwise e.g. --max-http-header-size breaks old Node/Electron.
76
- NODE_OPTIONS: `--require "${OVERRIDE_JS_SCRIPT}"`
+ 'NODE_OPTIONS': `--require ${
77
+ // Avoid quoting except when necessary, because node 8 doesn't support quotes here
78
+ OVERRIDE_JS_SCRIPT.includes(' ')
79
+ ? `"${OVERRIDE_JS_SCRIPT}"`
80
+ : OVERRIDE_JS_SCRIPT
81
+ }`
82
};
83
}
0 commit comments