From 669a423ff144fba8651d04313692f5a43c368638 Mon Sep 17 00:00:00 2001 From: Shivam Mathur Date: Wed, 3 Mar 2021 10:28:50 +0530 Subject: [PATCH] Fix warning in install.ts --- dist/index.js | 6 +++++- src/install.ts | 8 ++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/dist/index.js b/dist/index.js index c0ca3f72..7218d410 100644 --- a/dist/index.js +++ b/dist/index.js @@ -2152,7 +2152,11 @@ async function run() { } exports.run = run; // call the run function -run(); +(async () => { + await run(); +})().catch(error => { + core.setFailed(error.message); +}); /***/ }), diff --git a/src/install.ts b/src/install.ts index 48a9dd33..b8323432 100644 --- a/src/install.ts +++ b/src/install.ts @@ -1,4 +1,4 @@ -import {exec} from '@actions/exec/lib/exec'; +import {exec} from '@actions/exec'; import * as core from '@actions/core'; import * as config from './config'; import * as coverage from './coverage'; @@ -69,4 +69,8 @@ export async function run(): Promise { } // call the run function -run(); +(async () => { + await run(); +})().catch(error => { + core.setFailed(error.message); +});