From 2d505f2182fb608eca6becbe1e387a83fcb28455 Mon Sep 17 00:00:00 2001 From: Sebastian Weigand Date: Sat, 8 Jul 2023 17:29:37 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=A9=B9=20Fix=20bad=20broken=20error=20han?= =?UTF-8?q?dling=20due=20to=20bad=20import=20(#318)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit TypeError: Cannot read properties of undefined (reading 'setFailed') --- src/main.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main.ts b/src/main.ts index 9192e9f..62732c0 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,4 +1,4 @@ -import core from '@actions/core' +import { setFailed } from '@actions/core' import { loadConfig } from './load_config' import { setup_conda } from './conda_actions' @@ -8,9 +8,9 @@ async function run(): Promise { await setup_conda(config) } catch (error) { if (typeof error === 'string') { - core.setFailed(error) + setFailed(error) } else if (error instanceof Error) { - core.setFailed(error.message) + setFailed(error.message) } } }