-
Notifications
You must be signed in to change notification settings - Fork 314
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(helper-cli): Fix two issues with listing licenses
The list licenses command may crash in case `sourceCodeDir` is not provided in the following scenarios: 1. When the source artifact has been scanned for the given `packageId` andi `vcsProcessed` is empty, then `fetchScannedSources()` crashes withing `Downloader.download()`, because the downloader throws when it attempts to download from VCS. 2. When the ORT file does not contain any scan result for the given package, then the downloader also throws. Ensure that the downloader always attempts to download from the right source code origin, to fix scenario #1. Furthermore, return early in case there is no scan result for the given package to fix scenario #2. Recently a similar crash has been fixed by [1] also by returning earlier. So, move the early return from [1] to an even earlier position. [1] 5a21932 Signed-off-by: Frank Viernau <[email protected]>
- Loading branch information
Showing
2 changed files
with
26 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters