Skip to content

Commit 273e3c8

Browse files
Nisha Krnjudge
authored andcommitted
Fix live execution if no previous sboms are given
context_layers was used without being assigned anything in the case when only one layer was present. To fix this, we assign the variable final_layer to the one layer we had created and only popped the final layer in the case when previous sboms were given. Signed-off-by: Nisha K <[email protected]>
1 parent 20573c4 commit 273e3c8

File tree

1 file changed

+3
-1
lines changed
  • tern/analyze/default/live

1 file changed

+3
-1
lines changed

tern/analyze/default/live/run.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,9 @@ def execute_live(args):
155155
# resolve the packages for each of the layers
156156
context_layers.append(layer)
157157
resolve_context_packages(context_layers)
158+
final_layer = context_layers.pop()
159+
else:
160+
final_layer = layer
158161
# report out the packages
159-
final_layer = context_layers.pop()
160162
logger.debug("Preparing report")
161163
report.report_layer(final_layer, args)

0 commit comments

Comments
 (0)