From 6613baadcc7c231a1654e6eddc381529238ef913 Mon Sep 17 00:00:00 2001 From: Guillaume Grossetie Date: Fri, 16 Jul 2021 22:36:00 +0200 Subject: [PATCH] Catch unexpected errors --- dist/index.js | 6 +++++- index.js | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/dist/index.js b/dist/index.js index 4b9af62..9869c56 100644 --- a/dist/index.js +++ b/dist/index.js @@ -830,7 +830,11 @@ async function run () { } ;(async () => { - await run() + try { + await run() + } catch (error) { + Object(_actions_core__WEBPACK_IMPORTED_MODULE_0__.setFailed)(error) + } })() diff --git a/index.js b/index.js index 7b0fbb8..a5e56b9 100644 --- a/index.js +++ b/index.js @@ -65,5 +65,9 @@ async function run () { } ;(async () => { - await run() + try { + await run() + } catch (error) { + setFailed(error) + } })()