From 787ad3c57acee86df8fd49a1ef6de607415eaa3e Mon Sep 17 00:00:00 2001 From: Anthony Fu Date: Mon, 3 May 2021 12:12:31 +0800 Subject: [PATCH] chore: try fix --- scripts/actions/loader.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/actions/loader.ts b/scripts/actions/loader.ts index 72e6b73b..3d786645 100644 --- a/scripts/actions/loader.ts +++ b/scripts/actions/loader.ts @@ -10,12 +10,13 @@ async function main(): Promise { const fnName = process.argv[3] const github = getOctokit(token) - const fn = await import(`./${fnName}.ts`) - fn.default(github, context, core, io) + const fn = require(`./${fnName}.ts`) + fn(github, context, core, io) } // eslint-disable-next-line @typescript-eslint/no-explicit-any function handleError(err: any): void { console.error(err) core.setFailed(`Unhandled error: ${err}`) + process.exit(1) }