serverless/test/utils/child-process.js
Mariusz Nowak 8c3c7c4e3a chore: Rename "tests" folder to "test"
Also upgrade @serverless/eslint-config to v2
2020-08-28 16:22:09 +02:00

17 lines
425 B
JavaScript

'use strict';
const { execSync: originalExecSync } = require('child_process');
function execSync(command, options = null) {
// Same as native but outputs std in case of error
try {
return originalExecSync(command, options);
} catch (error) {
if (error.stdout) process.stdout.write(error.stdout);
if (error.stderr) process.stderr.write(error.stderr);
throw error;
}
}
module.exports = { execSync };