Skip to content

Commit

Permalink
Add logs to sbom
Browse files Browse the repository at this point in the history
  • Loading branch information
rudsberg committed Dec 4, 2024
1 parent 3e76f4c commit 44f1216
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
4 changes: 3 additions & 1 deletion dist/cleanup/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion dist/main/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions src/features/sbom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ export function setUpSBOMSupport(
if (!isFeatureEnabled()) {
return
}

console.log(`setUpSBOMSupport javaVersion ${javaVersion} distrubtion ${distribution}}`)
console.log(`major(javaVersion) = ${major(javaVersion)} major(javaVersion) < MIN_JAVA_VERSION = ${major(javaVersion) < MIN_JAVA_VERSION}`)
if (distribution !== c.DISTRIBUTION_GRAALVM) {
throw new Error(
`The '${INPUT_NI_SBOM}' option is only supported for Oracle GraalVM (distribution '${c.DISTRIBUTION_GRAALVM}'), but found distribution '${distribution}'.`
Expand All @@ -43,7 +44,7 @@ export async function processSBOM(): Promise<void> {
if (!isFeatureEnabled()) {
return
}

console.log('processing sbom...')
const sbomPath = await findSBOMFilePath()
try {
const sbomContent = fs.readFileSync(sbomPath, 'utf8')
Expand Down Expand Up @@ -96,7 +97,7 @@ function parseSBOM(jsonString: string): SBOM {
}

// Maps the SBOM to a list of components with their dependencies
export function mapToComponentsWithDependencies(sbom: SBOM): Component[] {
function mapToComponentsWithDependencies(sbom: SBOM): Component[] {
if (!sbom || sbom.components.length === 0) {
throw new Error('Invalid SBOM data or no components found.')
}
Expand Down

0 comments on commit 44f1216

Please sign in to comment.