prettier/tests/node_tests/child_process/exec.js

17 lines
308 B
JavaScript

/* @flow */
var exec = require('child_process').exec;
// callback only.
exec('ls', function(error, stdout, stderr) {
console.info(stdout);
});
// options only.
exec('ls', {timeout: 250});
// options + callback.
exec('ls', {maxBuffer: 100}, function(error, stdout, stderr) {
console.info(stdout);
});