diff --git a/dist/index.js b/dist/index.js index 8f80d91..b98421c 100644 --- a/dist/index.js +++ b/dist/index.js @@ -14719,7 +14719,9 @@ try { console.log('wrote it'); console.log(fs.readdirSync(__dirname)); console.log(__dirname); - exec.exec(filename) + exec.exec(filename)["catch"](function (err) { + core.setFailed("Codecov failed with the following error: " + err.message); + }) .then(function () { console.log('finished!'); }); diff --git a/src/index.ts b/src/index.ts index 2cfb444..2340ae0 100644 --- a/src/index.ts +++ b/src/index.ts @@ -32,6 +32,11 @@ try { console.log(__dirname); exec.exec(filename) + .catch((err) => { + core.setFailed( + `Codecov failed with the following error: ${err.message}`, + ); + }) .then(() => { console.log('finished!'); });