From c485e8b2837f19d689f49ad30cc99ea0f985b7c2 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 0befa9b0..3e990ab4 100644 --- a/dist/index.js +++ b/dist/index.js @@ -2122,7 +2122,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 a4229ee1..9b7aa1ee 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'; @@ -91,4 +91,8 @@ export async function run(): Promise { } // call the run function -run(); +(async () => { + await run(); +})().catch(error => { + core.setFailed(error.message); +});