diff --git a/test/inspector-cli/test-inspector-cli-auto-resume.js b/test/inspector-cli/test-inspector-cli-auto-resume.js index d670fefc70070b..bd498bc536535d 100644 --- a/test/inspector-cli/test-inspector-cli-auto-resume.js +++ b/test/inspector-cli/test-inspector-cli-auto-resume.js @@ -17,9 +17,10 @@ addLibraryPath(process.env); const scriptFullPath = fixtures.path('inspector-cli', 'break.js'); const script = path.relative(process.cwd(), scriptFullPath); - const cli = startCLI([script], [], { - env: { NODE_INSPECT_RESUME_ON_START: '1' } - }); + const env = { ...process.env }; + env.NODE_INSPECT_RESUME_ON_START = '1'; + + const cli = startCLI([script], [], { env }); cli.waitForInitialBreak() .then(() => {