From 7884734703c17fc06a977b11ad2ac912d75e7ce9 Mon Sep 17 00:00:00 2001 From: Haneen Mahdin Date: Sat, 30 Jul 2022 09:04:33 +0530 Subject: [PATCH] Fix types for errors --- src/cache-save.ts | 2 +- src/main.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cache-save.ts b/src/cache-save.ts index 24565a8e..ede5d83c 100644 --- a/src/cache-save.ts +++ b/src/cache-save.ts @@ -17,7 +17,7 @@ export async function run() { const cacheLock = core.getInput('cache'); await cachePackages(cacheLock); } catch (error) { - core.setFailed(error.message); + core.setFailed((error as Error).message); } } diff --git a/src/main.ts b/src/main.ts index ac7e51f5..41dcf844 100644 --- a/src/main.ts +++ b/src/main.ts @@ -72,7 +72,7 @@ export async function run() { `##[add-matcher]${path.join(matchersPath, 'eslint-compact.json')}` ); } catch (err) { - core.setFailed(err.message); + core.setFailed((err as Error).message); } }