Skip to content

Commit

Permalink
Fallback on 'cdx' or 'bom' JSON files for Java BOM (#1127)
Browse files Browse the repository at this point in the history
* Fallback on 'cdx' or 'bom' JSON files for Java BOM

Signed-off-by: nekhtan <129828933+nekhtan@users.noreply.github.com>

* Look for bom files in target folder only

Signed-off-by: nekhtan <129828933+nekhtan@users.noreply.github.com>

---------

Signed-off-by: nekhtan <129828933+nekhtan@users.noreply.github.com>
  • Loading branch information
nekhtan authored May 30, 2024
1 parent 150704d commit df888c3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1281,7 +1281,7 @@ export async function createJavaBom(path, options) {
bomJsonFiles = getAllFiles(path, "**/target/*.json", options);
// Check if the bom json files got created in a directory other than target
if (!bomJsonFiles.length) {
bomJsonFiles = getAllFiles(path, "**/bom*.json", options);
bomJsonFiles = getAllFiles(path, "target/**/*{cdx,bom}*.json", options);
}
const bomGenerated = bomJsonFiles.length;
if (!bomGenerated || result.status !== 0 || result.error) {
Expand Down

0 comments on commit df888c3

Please sign in to comment.