mirror of
https://github.com/zhigang1992/yarn.git
synced 2026-06-17 05:49:56 +08:00
* Adds the pkg-tests testsuite to the repository * Fixes flow * Adds babel to strip flowtypes * Moves pkg-tests into the packages directory * Fixes server timeouts * Feedback
20 lines
414 B
JavaScript
20 lines
414 B
JavaScript
/* @flow */
|
|
|
|
const cp = require('child_process');
|
|
|
|
exports.execFile = function(
|
|
path: string,
|
|
args: Array<string>,
|
|
options: Object,
|
|
): Promise<{|stdout: Buffer, stderr: Buffer|}> {
|
|
return new Promise((resolve, reject) => {
|
|
cp.execFile(path, args, options, (error, stdout, stderr) => {
|
|
if (error) {
|
|
reject(error);
|
|
} else {
|
|
resolve({stdout, stderr});
|
|
}
|
|
});
|
|
});
|
|
};
|