From f291e7ca9d859d4e1426d8dddc15d4d853cc5c7e Mon Sep 17 00:00:00 2001 From: ibrahim0814 Date: Thu, 5 Dec 2019 16:05:56 -0800 Subject: [PATCH] revert back to set failed --- dist/index.js | 14 ++++---------- index.js | 14 ++++---------- 2 files changed, 8 insertions(+), 20 deletions(-) diff --git a/dist/index.js b/dist/index.js index b3d5ae5..0f5fb62 100644 --- a/dist/index.js +++ b/dist/index.js @@ -332,7 +332,7 @@ try { ], options ).catch((err)=>{ - core.warning(`Codecov encountered the following error: ${err}`); + core.setFailed(`Codecov failed with the following error ${err}`); }) .then(() => { unlinkFile(); @@ -353,10 +353,7 @@ try { `${yml}` ], options - ).catch((err)=>{ - core.warning(`Codecov encountered the following error: ${err}`); - }) - .then(() => { + ).then(() => { unlinkFile(); }); } @@ -377,7 +374,7 @@ try { ], options ).catch((err)=>{ - core.warning(`Codecov encountered the following error: ${err}`); + core.setFailed(`Codecov failed with the following error ${err}`); }) .then(() => { unlinkFile(); @@ -388,10 +385,7 @@ try { "bash", ["codecov.sh", "-n", `${name}`, "-F", `${flags}`, "-y", `${yml}`], options - ).catch((err)=>{ - core.warning(`Codecov encountered the following error: ${err}`); - }) - .then(() => { + ).then(() => { unlinkFile(); }); } diff --git a/index.js b/index.js index 16d3f91..f06708e 100644 --- a/index.js +++ b/index.js @@ -69,7 +69,7 @@ try { ], options ).catch((err)=>{ - core.warning(`Codecov encountered the following error: ${err}`); + core.setFailed(`Codecov failed with the following error ${err}`); }) .then(() => { unlinkFile(); @@ -90,10 +90,7 @@ try { `${yml}` ], options - ).catch((err)=>{ - core.warning(`Codecov encountered the following error: ${err}`); - }) - .then(() => { + ).then(() => { unlinkFile(); }); } @@ -114,7 +111,7 @@ try { ], options ).catch((err)=>{ - core.warning(`Codecov encountered the following error: ${err}`); + core.setFailed(`Codecov failed with the following error ${err}`); }) .then(() => { unlinkFile(); @@ -125,10 +122,7 @@ try { "bash", ["codecov.sh", "-n", `${name}`, "-F", `${flags}`, "-y", `${yml}`], options - ).catch((err)=>{ - core.warning(`Codecov encountered the following error: ${err}`); - }) - .then(() => { + ).then(() => { unlinkFile(); }); }