From 6afe2e0d90d89b6d31f42255d7867eda7428ff15 Mon Sep 17 00:00:00 2001 From: ibrahim0814 Date: Tue, 19 Nov 2019 00:28:57 -0800 Subject: [PATCH] fix logic --- index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/index.js b/index.js index 5fc011f..894d0d9 100644 --- a/index.js +++ b/index.js @@ -32,7 +32,7 @@ try { myError += data.toString(); } }; - + options.env = { CODECOV_TOKEN: `${token}`, GITHUB_ACTION: process.env.GITHUB_ACTION, @@ -41,10 +41,10 @@ try { GITHUB_SHA: process.env.GITHUB_SHA }; - if (file === '' ){ - exec.exec('bash', ['codecov.sh', '-f', `${file}`, '-n', `${name}`, '-F', `${flags}`, ], options); + if (file){ + exec.exec('bash', ['codecov.sh', '-f', `${file}`, '-n', `${name}`, '-F', `${flags}`], options); }else{ - exec.exec('bash', ['codecov.sh', `${name}`, '-F', `${flags}`, ], options); + exec.exec('bash', ['codecov.sh','-n', `${name}`, '-F', `${flags}`], options); } });