mirror of
https://github.com/codecov/codecov-action.git
synced 2026-02-09 20:47:26 +00:00
Move bash_args up.
This commit is contained in:
parent
0badd2fa85
commit
405bce6a2f
2 changed files with 20 additions and 22 deletions
22
dist/index.js
vendored
22
dist/index.js
vendored
|
|
@ -2535,9 +2535,7 @@ try {
|
|||
fail_ci = truthy.includes(core.getInput("fail_ci_if_error").toLowerCase());
|
||||
|
||||
const bash_args = core.getInput("bash_args");
|
||||
core.debug(`bash_args: ${bash_args}`);
|
||||
const bash_args_clean = bash_args.split(/[\n]+/).map(s => s.trim()).filter(i => i !== '');
|
||||
core.debug(`bash_args_clean (${bash_args_clean.length}: ${bash_args_clean}`);
|
||||
|
||||
request({
|
||||
json: false,
|
||||
|
|
@ -2614,6 +2612,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}`
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
execArgs.push(
|
||||
"-n", `${name}`,
|
||||
"-F", `${flags}`
|
||||
|
|
@ -2643,16 +2651,6 @@ 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)
|
||||
.catch(err => {
|
||||
if (fail_ci) {
|
||||
|
|
|
|||
20
index.js
20
index.js
|
|
@ -96,6 +96,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}`
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
execArgs.push(
|
||||
"-n", `${name}`,
|
||||
"-F", `${flags}`
|
||||
|
|
@ -125,16 +135,6 @@ 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)
|
||||
.catch(err => {
|
||||
if (fail_ci) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue