diff options
Diffstat (limited to 'lib/child_process.js')
-rw-r--r-- | lib/child_process.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/child_process.js b/lib/child_process.js index e682aed5ae..d6b029b7a5 100644 --- a/lib/child_process.js +++ b/lib/child_process.js @@ -422,7 +422,7 @@ function spawnSync(/*file, args, options*/) { if (Buffer.isBuffer(input)) pipe.input = input; else if (typeof input === 'string') - pipe.input = new Buffer(input, options.encoding); + pipe.input = Buffer.from(input, options.encoding); else throw new TypeError(util.format( 'stdio[%d] should be Buffer or string not %s', |