| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 2ee2cc6 commit 4cb4803
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -117,6 +117,17 @@ child.exec(`${nodejs} --use-strict -p process.execArgv`, | |||
| 117 | 117 | assert.strictEqual(stdout, ''); | |
| 118 | 118 | assert.strictEqual(stderr, ''); | |
| 119 | 119 | })); | |
| 120 | + | ||
| 121 | + // Make sure that monkey-patching process.execArgv doesn't cause child_process | ||
| 122 | + // to incorrectly munge execArgv. | ||
| 123 | + child.exec( | ||
| 124 | + `${nodejs} -e "process.execArgv = ['-e', 'console.log(42)', 'thirdArg'];` + | ||
| 125 | + `require('child_process').fork('${emptyFile}')"`, | ||
| 126 | + common.mustCall((err, stdout, stderr) => { | ||
| 127 | + assert.ifError(err); | ||
| 128 | + assert.strictEqual(stdout, '42\n'); | ||
| 129 | + assert.strictEqual(stderr, ''); | ||
| 130 | + })); | ||
| 120 | 131 | } | |
| 121 | 132 | ||
| 122 | 133 | // Regression test for https://github.com/nodejs/node/issues/8534. | |
| Back | FazBrowse Home | New Git URL |
0 commit comments