Skip to content

Commit 793d679

Browse files
authored
bug(merge_cyclonedx_sboms): unbound variable (#41)
* bug(merge_cyclonedx_sboms): unbound variable Signed-off-by: Julio Jimenez <julio@clickhouse.com> * increment it Signed-off-by: Julio Jimenez <julio@clickhouse.com> --------- Signed-off-by: Julio Jimenez <julio@clickhouse.com>
1 parent 95403c3 commit 793d679

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

entrypoint.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,8 @@ EOF
447447
# Initialize empty array
448448
echo "[]" > "$all_components"
449449

450+
local i=0
451+
450452
# Collect all components with source information
451453
for sbom_file in "${cyclonedx_files[@]}"; do
452454
local sbom_file="${cyclonedx_files[i]}"
@@ -470,6 +472,7 @@ EOF
470472
log_warning "Failed to extract components from $(basename "$sbom_file")"
471473
fi
472474
fi
475+
((i++))
473476
done
474477

475478
# Remove duplicates based on name+version+purl combination

0 commit comments

Comments
 (0)