Skip to content
This repository has been archived by the owner on Aug 16, 2024. It is now read-only.
/ spawn-sync Public archive

Pollyfill v0.12/iojs spawnSync method

License

Notifications You must be signed in to change notification settings

ForbesLindesay/spawn-sync

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

92 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Pollyfill v0.12/iojs spawnSync method

Resources

License

Security policy

Stars

Watchers

Forks

Packages

No packages published