Fix the unknown licenses error message

This commit is contained in:
Federico Builes
2022-06-16 06:03:16 +02:00
parent 29fc7a23bd
commit 1c59cdf2a9
3 changed files with 8 additions and 1 deletions

3
dist/index.js generated vendored
View File

@@ -244,6 +244,9 @@ function printLicensesError(changes, licenses) {
}
}
function printNullLicenses(changes) {
if (changes.length === 0) {
return;
}
core.info('\nWe could not detect a license for the following dependencies:\n');
for (const change of changes) {
core.info(`${ansi_styles_1.default.bold.open}${change.manifest} » ${change.name}@${change.version}${ansi_styles_1.default.bold.close}`);

2
dist/index.js.map generated vendored

File diff suppressed because one or more lines are too long

View File

@@ -139,6 +139,10 @@ function printLicensesError(
}
function printNullLicenses(changes: Array<Change>): void {
if (changes.length === 0) {
return
}
core.info('\nWe could not detect a license for the following dependencies:\n')
for (const change of changes) {
core.info(