From 224e1a7a687920dcbf1ec41f56fbc82dcea51197 Mon Sep 17 00:00:00 2001 From: ibrahim0814 Date: Tue, 12 Nov 2019 13:59:17 -0800 Subject: [PATCH] test after running request script --- index.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) 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}`); + } + }); });