Skip to content

Commit c359650

Browse files
committed
Include component name as part of the warning/first message to make warnings distinguishable in the log
1 parent eb05cec commit c359650

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

tasks/retire/index.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,18 +58,17 @@ async function run() {
5858
: 'none';
5959

6060
const message =
61-
`- Component: ${component}
62-
- Version: ${version}
61+
`- Version: ${version}
6362
- File: ${file}
6463
- Severity: ${severity}
6564
- CVEs: ${cves}
6665
- Info: ${infoLinks}`;
6766

6867
if (hasVulns) {
6968
hasRealVulnerabilities = true;
70-
tl.warning(`Vulnerable library found:\n${message}`);
69+
tl.warning(`Vulnerable library found: ${component}\n${message}`);
7170
} else if (verbose) {
72-
console.log(`Library matched but no known vulnerabilities:\n${message}`);
71+
console.log(`Library matched but no known vulnerabilities: ${component}\n${message}`);
7372
}
7473
}
7574
}

0 commit comments

Comments
 (0)