[elbe-devel] [PATCH 1/2] commands: cyclonedx-sbom: parse only subcommand args
Thomas Weißschuh
thomas.weissschuh at linutronix.de
Mon Jul 8 12:21:40 CEST 2024
Subcommands of the "elbe" command should not parse full sys.argv but
only its own arguments.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh at linutronix.de>
---
elbepack/commands/cyclonedx-sbom.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/elbepack/commands/cyclonedx-sbom.py b/elbepack/commands/cyclonedx-sbom.py
index 19173f6f2fb7..431696e09816 100644
--- a/elbepack/commands/cyclonedx-sbom.py
+++ b/elbepack/commands/cyclonedx-sbom.py
@@ -84,7 +84,7 @@ def _component_from_apt_pkg(pkg):
def run_command(argv):
oparser = optparse.OptionParser()
oparser.add_option('-d', dest='elbe_build')
- options, args = oparser.parse_args()
+ options, args = oparser.parse_args(argv)
ts = datetime.datetime.now(tz=datetime.timezone.utc)
project_dir = options.elbe_build
--
2.45.2
More information about the elbe-devel
mailing list