This repository has been archived by the owner. It is now read-only.
Pollyfill v0.12/iojs spawnSync method
Clone or download
Latest commit b5d9760 May 14, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore Initial commit Jan 11, 2014
LICENSE Initial commit Jan 11, 2014
README.md Remove the polyfill May 14, 2018
index.js Remove the polyfill May 14, 2018
package.json Release 2.0.0 May 14, 2018

README.md

spawn-sync

This used to be a polyfill for require('child_process').spawnSync but now all actively maintained node versions already support spawnSync, so this is just a stub that re-exports spawnSync.

Usage

You should remove this library from your dependencies and just do:

var spawnSync = require('child_process').spawnSync;

var result = spawnSync('node',
                       ['filename.js'],
                       {input: 'write this to stdin'});

if (result.status !== 0) {
  process.stderr.write(result.stderr);
  process.exit(result.status);
} else {
  process.stdout.write(result.stdout);
  process.stderr.write(result.stderr);
}

License

MIT