Skip to content

Commit

Permalink
rebuild dist
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelcolvin committed Mar 20, 2020
1 parent 0e6a911 commit 2ce3b38
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2342,7 +2342,7 @@ try {
const token = core.getInput("token");
const flags = core.getInput("flags");
const file = core.getInput("file");
const env_vars = core.getInput("env_vars");
let env_vars = core.getInput("env_vars");
fail_ci = core.getInput("fail_ci_if_error").toLowerCase();

if (
Expand Down Expand Up @@ -2396,11 +2396,18 @@ try {
options.env.CODECOV_TOKEN = token
}

for (let env_var of env_vars.split(',')) {
if (env_var) {
options.env[env_var] = process.env[env_var]
console.warn('env_vars:', env_vars)
const env_vars_arg = []

for (let env_var of env_vars.split(",")) {
let env_var_clean = env_var.trim();
if (env_var_clean) {
options.env[env_var_clean] = process.env[env_var_clean];
env_vars_arg.push(env_var_clean)
}
}
console.warn('options.env:', options.env)
console.warn('env_vars_arg:', env_vars_arg)

const execArgs = ["codecov.sh"];
if (file) {
Expand All @@ -2420,6 +2427,12 @@ try {
);
}

if (env_vars_arg.length) {
execArgs.push(
"-e", env_vars_arg.join(",")
);
}

exec.exec("bash", execArgs, options)
.catch(err => {
if (fail_ci) {
Expand Down

0 comments on commit 2ce3b38

Please sign in to comment.