Skip to content

Commit

Permalink
Fix cli argument bug. (#45)
Browse files Browse the repository at this point in the history
Signed-off-by: Caroline Russell <[email protected]>
  • Loading branch information
cerrussell authored Dec 6, 2024
1 parent f72d093 commit b7c7651
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 6 additions & 4 deletions custom_json_diff/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,14 @@ def build_args() -> argparse.Namespace:
version="%(prog)s " + version("custom_json_diff")
)
parser.set_defaults(
preconfig_diff_type="",
preset_type="",
allow_new_versions=False,
report_template="",
exclude=[],
allow_new_data=False,
include=[]
include=[],
include_empty=True,
bom_profile=None
)
parser.add_argument(
"-i",
Expand Down Expand Up @@ -129,8 +131,8 @@ def main():
preset_type = args.preset_type.lower()
if preset_type and preset_type not in ("bom", "csaf"):
raise ValueError("Preconfigured type must be either bom or csaf.")
if args.bom_profile:
if args.bom_profile not in ("gn", "gnv", "nv"):
if preset_type == "bom":
if args.bom_profile and args.bom_profile not in ("gn", "gnv", "nv"):
raise ValueError("BOM profile must be either gn, gnv, or nv.")
options = Options(
allow_new_versions=args.allow_new_versions,
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "custom-json-diff"
version = "2.1.4"
version = "2.1.5"
description = "CycloneDx BOM and Oasis CSAF diffing and comparison tool."
authors = [
{ name = "Caroline Russell", email = "[email protected]" },
Expand Down

0 comments on commit b7c7651

Please sign in to comment.