diff --git a/dist/index.js b/dist/index.js index f5d1c54..2c1bc5f 100644 --- a/dist/index.js +++ b/dist/index.js @@ -331,10 +331,12 @@ try { "-Z" ], options - ) + ).catch((err)=>{ + core.setFailed(`Action failed with error ${err}`); + }) .then(() => { unlinkFile(); - }); + }) } else { exec .exec( @@ -351,7 +353,9 @@ try { `${yml}` ], options - ) + ).catch((err)=>{ + core.setFailed(`Action failed with error ${err}`); + }) .then(() => { unlinkFile(); }); @@ -372,7 +376,9 @@ try { "-Z" ], options - ) + ).catch((err)=>{ + core.setFailed(`Action failed with error ${err}`); + }) .then(() => { unlinkFile(); }); @@ -382,7 +388,9 @@ try { "bash", ["codecov.sh", "-n", `${name}`, "-F", `${flags}`, "-y", `${yml}`], options - ) + ).catch((err)=>{ + core.setFailed(`Action failed with error ${err}`); + }) .then(() => { unlinkFile(); }); diff --git a/index.js b/index.js index 49ca5e0..b4deac4 100644 --- a/index.js +++ b/index.js @@ -68,10 +68,12 @@ try { "-Z" ], options - ) + ).catch((err)=>{ + core.setFailed(`Action failed with error ${err}`); + }) .then(() => { unlinkFile(); - }); + }) } else { exec .exec( @@ -88,7 +90,9 @@ try { `${yml}` ], options - ) + ).catch((err)=>{ + core.setFailed(`Action failed with error ${err}`); + }) .then(() => { unlinkFile(); }); @@ -109,7 +113,9 @@ try { "-Z" ], options - ) + ).catch((err)=>{ + core.setFailed(`Action failed with error ${err}`); + }) .then(() => { unlinkFile(); }); @@ -119,7 +125,9 @@ try { "bash", ["codecov.sh", "-n", `${name}`, "-F", `${flags}`, "-y", `${yml}`], options - ) + ).catch((err)=>{ + core.setFailed(`Action failed with error ${err}`); + }) .then(() => { unlinkFile(); });