From 83dda62a70fe033875812fe585926da0cd219bdb Mon Sep 17 00:00:00 2001 From: Yang Chen Date: Sat, 9 Nov 2019 03:34:10 +1100 Subject: [PATCH] Fail action when script fails. --- lib/main.js | 2 +- src/main.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/main.js b/lib/main.js index bf89b34c..0db2ba50 100644 --- a/lib/main.js +++ b/lib/main.js @@ -64,7 +64,7 @@ function run() { yield exec.exec(`${script}`); } catch (error) { - console.error(error.message); + core.setFailed(error.message); } // finally kill the emulator yield emulator_manager_1.killEmulator(); diff --git a/src/main.ts b/src/main.ts index e8a82fa0..9efc4ac4 100644 --- a/src/main.ts +++ b/src/main.ts @@ -56,7 +56,7 @@ async function run() { try { await exec.exec(`${script}`); } catch (error) { - console.error(error.message); + core.setFailed(error.message); } // finally kill the emulator