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