spawn-sync

Exports child_process.spawnSync

MIT 19 个版本
安装
npm install spawn-sync
yarn add spawn-sync
pnpm add spawn-sync
bun add spawn-sync
README

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

版本列表
2.0.0 2018-05-14
1.0.15 2016-01-03
1.0.14 2015-10-30
1.0.13 2015-07-16
1.0.12 2015-07-16
1.0.11 2015-05-14
1.0.10 2015-05-13
1.0.9 2015-05-13
1.0.8 2015-05-13
1.0.7 2015-05-13
1.0.6 2015-04-10
1.0.5 2015-02-16
1.0.4 2015-02-11
1.0.3 2015-02-05
1.0.2 2015-01-15
1.0.1 2014-12-17
1.0.0 2014-08-04
0.0.2 2014-01-11
0.0.0 2014-01-11