Always print an error message, never error silently (#262)

* Always print an error message, never error silently

* `npm run build`
This commit is contained in:
Dilum Aluthge
2024-07-18 11:30:05 -04:00
committed by GitHub
parent 4778d3d0c8
commit ba42af3a54
2 changed files with 4 additions and 0 deletions

2
lib/installer.js generated
View File

@@ -214,6 +214,7 @@ function getFileInfo(versionInfo, version, arch) {
return null; return null;
} }
if (!versionInfo[version]) { if (!versionInfo[version]) {
core.error(`Encountered error: ${err}`);
throw err; throw err;
} }
for (let file of versionInfo[version].files) { for (let file of versionInfo[version].files) {
@@ -233,6 +234,7 @@ function getFileInfo(versionInfo, version, arch) {
} }
} }
} }
core.error(`Encountered error: ${err}`);
throw err; throw err;
} }
exports.getFileInfo = getFileInfo; exports.getFileInfo = getFileInfo;

View File

@@ -184,6 +184,7 @@ export function getFileInfo(versionInfo, version: string, arch: string) {
} }
if (!versionInfo[version]) { if (!versionInfo[version]) {
core.error(`Encountered error: ${err}`)
throw err throw err
} }
@@ -206,6 +207,7 @@ export function getFileInfo(versionInfo, version: string, arch: string) {
} }
} }
core.error(`Encountered error: ${err}`)
throw err throw err
} }