From ba42af3a54fac9a913e95d57b4a69d03253d23ce Mon Sep 17 00:00:00 2001 From: Dilum Aluthge Date: Thu, 18 Jul 2024 11:30:05 -0400 Subject: [PATCH] Always print an error message, never error silently (#262) * Always print an error message, never error silently * `npm run build` --- lib/installer.js | 2 ++ src/installer.ts | 2 ++ 2 files changed, 4 insertions(+) diff --git a/lib/installer.js b/lib/installer.js index 569556c..7eccae9 100644 --- a/lib/installer.js +++ b/lib/installer.js @@ -214,6 +214,7 @@ function getFileInfo(versionInfo, version, arch) { return null; } if (!versionInfo[version]) { + core.error(`Encountered error: ${err}`); throw err; } for (let file of versionInfo[version].files) { @@ -233,6 +234,7 @@ function getFileInfo(versionInfo, version, arch) { } } } + core.error(`Encountered error: ${err}`); throw err; } exports.getFileInfo = getFileInfo; diff --git a/src/installer.ts b/src/installer.ts index b7ca4ff..a339d49 100644 --- a/src/installer.ts +++ b/src/installer.ts @@ -184,6 +184,7 @@ export function getFileInfo(versionInfo, version: string, arch: string) { } if (!versionInfo[version]) { + core.error(`Encountered error: ${err}`) throw err } @@ -206,6 +207,7 @@ export function getFileInfo(versionInfo, version: string, arch: string) { } } + core.error(`Encountered error: ${err}`) throw err }