/
githubmirror
/
yarn
Обзор
Документация
Войти
/
githubmirror
/
yarn
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
packages/pkg-tests/pkg-tests-core/sources/utils/exec.js
21 строка
512 B
Maël Nison
Set up CI with Azure Pipelines (#6495)
15 ноя 2018, 01:10
Не верифицирован
15 ноя 2018, 01:10
7f41910
Код
Авторство
О чём код?
/* @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 { stdout = stdout.replace(/\r\n?/g, `\n`); stderr = stderr.replace(/\r\n?/g, `\n`); resolve({stdout, stderr}); } }); }); };