diff --git a/index.js b/index.js index a2968b5..8584988 100644 --- a/index.js +++ b/index.js @@ -26,7 +26,20 @@ try { request('http://codecov.io/bash', (error, response, body) => { console.log('error:', error); console.log('statusCode:', response && response.statusCode); - console.log('body:', body); + //console.log('body:', body); + + const command = `bash ${body} -t ${token} -n ${name} -F ${flags} -f ${file}` + //const command = `bash ${body} -t ${token} -n ${name} -F ${flags} -f ${file}` + exec(command, (err, stdout, stderr) => { + if (err) { + //some err occurred + console.error(err) + } else { + // the *entire* stdout and stderr (buffered) + console.log(`stdout: ${stdout}`); + console.log(`stderr: ${stderr}`); + } + }); });