try exec file

This commit is contained in:
ibrahim0814
2019-11-14 00:29:39 -08:00
parent bab0bf56a8
commit f0ee262b3a

View File

@@ -1,8 +1,8 @@
const core = require('@actions/core'); const core = require('@actions/core');
const github = require('@actions/github'); const github = require('@actions/github');
const request = require('request'); const request = require('request');
const execSh = require('./node_modules/exec-sh/lib/exec-sh'); //const execSh = require('./node_modules/exec-sh/lib/exec-sh');
//const execFile = require('child_process').execFile; const execFile = require('child_process').execFile;
// import { execSync } from 'child_process'; // replace ^ if using ES modules // import { execSync } from 'child_process'; // replace ^ if using ES modules
// the default is 'buffer' // the default is 'buffer'
@@ -48,9 +48,9 @@ try {
// }) // })
body = body.replace("set -e +o pipefail","") //body = body.replace("set -e +o pipefail","")
execSh([`export CODECOV_TOKEN=${token}`, body],(error, stdout, stderr) => { execFile('node', ['--version'],(error, stdout, stderr) => {
console.log("error: ", error); console.log("error: ", error);
console.log("stdout: ", stdout); console.log("stdout: ", stdout);
console.log("stderr: ", stderr); console.log("stderr: ", stderr);