spawn-sync
Prollyfill for child_process.spawnSync
Last updated 10 years ago by forbeslindesay .
MIT · Repository · Bugs · Original npm
$ cnpm install spawn-sync 
SYNC missed versions from official npm registry.

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

Current Tags

  • 1.0.15                                ...           latest (10 years ago)

1 Versions

  • 1.0.15                                ...           10 years ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (2)
Dev Dependencies (1)
Dependents (0)
None

Copyright 2013 - present © cnpmjs.org