Skip to content

Commit

Permalink
Pass through existing $NODE_OPTIONS
Browse files Browse the repository at this point in the history
  • Loading branch information
goto-bus-stop committed Aug 17, 2018
1 parent 515c5f9 commit 0027720
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion autocannon.js
Expand Up @@ -181,7 +181,8 @@ function start (argv) {
const proc = spawn(argv.spawn[0], argv.spawn.slice(1), {
stdio: ['ignore', 'inherit', 'inherit'],
env: Object.assign({}, process.env, {
NODE_OPTIONS: ['-r', 'autocannonDetectPort'].join(' '),
NODE_OPTIONS: ['-r', 'autocannonDetectPort'].join(' ') +
(process.env.NODE_OPTIONS ? ` ${process.env.NODE_OPTIONS}` : ''),
NODE_PATH: alterPath.get(),
AUTOCANNON_SOCKET: socketPath
})
Expand Down

0 comments on commit 0027720

Please sign in to comment.