Skip to content

Commit

Permalink
feat(helper-cli): Improve the output of list licenses command
Browse files Browse the repository at this point in the history
For packages which do not have a scan result the command just outputs
"scan results:". Change that to a more speaking message.

Signed-off-by: Frank Viernau <[email protected]>
  • Loading branch information
fviernau committed Nov 9, 2023
1 parent 5a21932 commit 1534d39
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions helper-cli/src/main/kotlin/commands/ListLicensesCommand.kt
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,11 @@ internal class ListLicensesCommand : CliktCommand(
}
}

if (findingsByProvenance.isEmpty()) {
println("No scan results available.")
return
}

buildString {
appendLine(" scan results:")
findingsByProvenance.keys.forEachIndexed { i, provenance ->
Expand Down

0 comments on commit 1534d39

Please sign in to comment.