| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent d9465ae commit f97f6c5
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -4,7 +4,7 @@ const tmpdir = require('../common/tmpdir'); | |||
| 4 | 4 | const assert = require('assert'); | |
| 5 | 5 | const fs = require('fs'); | |
| 6 | 6 | const join = require('path').join; | |
| 7 | - const spawn = require('child_process').spawnSync; | ||
| 7 | + const { spawnSync } = require('child_process'); | ||
| 8 | 8 | ||
| 9 | 9 | // Test that invoking node with require, and piping stderr to file, | |
| 10 | 10 | // does not result in exception, | |
@@ -21,7 +21,7 @@ const stream = fs.createWriteStream(stderrOutputPath); | |||
| 21 | 21 | fs.writeFileSync(fakeModulePath, '', 'utf8'); | |
| 22 | 22 | ||
| 23 | 23 | stream.on('open', () => { | |
| 24 | - spawn(process.execPath, { | ||
| 24 | + spawnSync(process.execPath, { | ||
| 25 | 25 | input: `require("${fakeModulePath.replace(/\\/g, '/')}")`, | |
| 26 | 26 | stdio: ['pipe', 'pipe', stream] | |
| 27 | 27 | }); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments