doc: fix require call for spawn() in code example
PR-URL: https://github.com/nodejs/node/pull/29621 Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
parent
1fceccb4cf
commit
b82ffd9526
@ -112,7 +112,7 @@ bat.on('exit', (code) => {
|
||||
|
||||
```js
|
||||
// OR...
|
||||
const { exec } = require('child_process');
|
||||
const { exec, spawn } = require('child_process');
|
||||
exec('my.bat', (err, stdout, stderr) => {
|
||||
if (err) {
|
||||
console.error(err);
|
||||
|
Loading…
x
Reference in New Issue
Block a user