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); +});