Skip to content

Commit b331d54

Browse files
committed
Try to keep supporting Node 8 so far as possible
1 parent 0a5b939 commit b331d54

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,11 @@ export function getTerminalEnvVars(
7373
// We use $NODE_OPTIONS to prepend our script into node. Notably this also
7474
// clears it, which is important, as _our_ NODE_OPTIONS aren't meant for
7575
// subprocesses. Otherwise e.g. --max-http-header-size breaks old Node/Electron.
76-
NODE_OPTIONS: `--require "${OVERRIDE_JS_SCRIPT}"`
76+
'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+
}`
7782
};
7883
}

0 commit comments

Comments
 (0)