diff --git a/doc/api/child_process.md b/doc/api/child_process.md index 0a9c0e3e326cc3..54c591e98542ef 100644 --- a/doc/api/child_process.md +++ b/doc/api/child_process.md @@ -138,7 +138,7 @@ exec('my.bat', (err, stdout, stderr) => { }); // Script with spaces in the filename: -const bat = spawn('"my script.cmd"', ['a', 'b'], { shell: true }); +const bat = spawn('"my script.cmd" a b', { shell: true }); // or: exec('"my script.cmd" a b', (err, stdout, stderr) => { // ... @@ -158,7 +158,7 @@ exec('my.bat', (err, stdout, stderr) => { }); // Script with spaces in the filename: -const bat = spawn('"my script.cmd"', ['a', 'b'], { shell: true }); +const bat = spawn('"my script.cmd" a b', { shell: true }); // or: exec('"my script.cmd" a b', (err, stdout, stderr) => { // ...