mirror of
https://github.com/codecov/codecov-action.git
synced 2026-02-12 22:17:24 +00:00
Compile.
This commit is contained in:
parent
aac37b05f8
commit
0badd2fa85
1 changed files with 16 additions and 12 deletions
28
dist/index.js
vendored
28
dist/index.js
vendored
|
|
@ -2531,19 +2531,13 @@ try {
|
||||||
const write_path = core.getInput("path_to_write_report");
|
const write_path = core.getInput("path_to_write_report");
|
||||||
const verbose = core.getInput("verbose");
|
const verbose = core.getInput("verbose");
|
||||||
|
|
||||||
fail_ci = core.getInput("fail_ci_if_error").toLowerCase();
|
const truthy = ["yes","y","true","t","1"];
|
||||||
|
fail_ci = truthy.includes(core.getInput("fail_ci_if_error").toLowerCase());
|
||||||
|
|
||||||
if (
|
const bash_args = core.getInput("bash_args");
|
||||||
fail_ci === "yes" ||
|
core.debug(`bash_args: ${bash_args}`);
|
||||||
fail_ci === "y" ||
|
const bash_args_clean = bash_args.split(/[\n]+/).map(s => s.trim()).filter(i => i !== '');
|
||||||
fail_ci === "true" ||
|
core.debug(`bash_args_clean (${bash_args_clean.length}: ${bash_args_clean}`);
|
||||||
fail_ci === "t" ||
|
|
||||||
fail_ci === "1"
|
|
||||||
) {
|
|
||||||
fail_ci = true;
|
|
||||||
} else {
|
|
||||||
fail_ci = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
request({
|
request({
|
||||||
json: false,
|
json: false,
|
||||||
|
|
@ -2649,6 +2643,16 @@ try {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (bash_args_clean.length) {
|
||||||
|
for(const x of bash_args_clean) {
|
||||||
|
const arg = x.slice(0,2);
|
||||||
|
const val = x.slice(2).trim();
|
||||||
|
execArgs.push(
|
||||||
|
`${arg}`, `${val}`
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
exec.exec("bash", execArgs, options)
|
exec.exec("bash", execArgs, options)
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
if (fail_ci) {
|
if (fail_ci) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue