From a7a75759e970810c3581c932945f8365b7e83252 Mon Sep 17 00:00:00 2001 From: Matteo Dell'Acqua <82184604+MatteoH2O1999@users.noreply.github.com> Date: Mon, 22 May 2023 17:05:57 +0200 Subject: [PATCH] Fix type error in catch block --- src/main.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main.ts b/src/main.ts index b449dc3..bd74080 100644 --- a/src/main.ts +++ b/src/main.ts @@ -128,7 +128,11 @@ async function run(): Promise { core.addPath(toolFolderPath) core.debug(`Tool path added to PATH: ${toolFolderPath}`) } catch (error) { - core.setFailed(error.message) + if (error instanceof Error) { + core.setFailed(error.message) + } else { + core.setFailed('Unknown error') + } } }