mirror of
https://github.com/codecov/codecov-action.git
synced 2025-12-23 20:27:02 +08:00
try exec file
This commit is contained in:
8
index.js
8
index.js
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user