Skip to content

Commit 90297ef

Browse files
rnjudgeNisha K
authored andcommitted
Update debug execution path with prereqs object
Commit 733eb12 refactored Tern to pass command line arguments as a single object, prereqs, instead of the arg.* values separately. The debug execution path was not updated to use the prereqs object, however, and therefore, was throwing an AttributeError trying to read 'args.shell' as a prereqs object. This commit updates the debug execution path to utilize a prereqs object. Resolves #967 Signed-off-by: Rose Judge <[email protected]>
1 parent f6535bb commit 90297ef

File tree

1 file changed

+5
-1
lines changed
  • tern/analyze/default/debug

1 file changed

+5
-1
lines changed

tern/analyze/default/debug/run.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
from tern.utils import constants
2020
from tern.analyze.default.command_lib import command_lib
2121
from tern.analyze.default import collect
22+
from tern.analyze.default import core
2223
from tern.analyze.default.container import run
2324
from tern.analyze.default.container import image as cimage
2425
from tern.analyze.default.container import single_layer
@@ -60,6 +61,9 @@ def look_up_lib(keys):
6061
def invoke_script(args):
6162
"""Assuming we have a mounted filesystem, invoke the script in the
6263
command library"""
64+
# make a Prereqs object
65+
prereqs = core.Prereqs()
66+
prereqs.shell = args.shell
6367
# if we're looking up the snippets library
6468
# we should see 'snippets' in the keys
6569
if 'snippets' in args.keys and 'packages' in args.keys:
@@ -72,7 +76,7 @@ def invoke_script(args):
7276
else:
7377
info_dict = look_up_lib(args.keys)
7478
result = collect.get_pkg_attrs(
75-
info_dict, args.shell, package_name=args.package)
79+
info_dict, prereqs, package_name=args.package)
7680
print()
7781
print("*************************************************************")
7882
print(" Command Library Script Verification mode ")

0 commit comments

Comments
 (0)