Force error casting to get messages!
This commit is contained in:
+1
-1
@@ -85,7 +85,7 @@ function validateLicenses(
|
|||||||
try {
|
try {
|
||||||
invalid_licenses = licenses.filter(license => !isSPDXValid(license))
|
invalid_licenses = licenses.filter(license => !isSPDXValid(license))
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
throw new Error(`Error validating license(s): ${error.message}`)
|
throw new Error(`Error validating license(s): ${(error as Error).message}`)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (invalid_licenses.length > 0) {
|
if (invalid_licenses.length > 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user