Skip to content

Commit

Permalink
fix: Handling of unknown version differences (fixes #7)
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonyharrison committed Oct 29, 2024
1 parent d11327f commit e4c8390
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions sbomdiff/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,8 @@ def main(argv=None):
# Compare values for common package
version1, license1 = packages1[package]
version2, license2 = packages2[package]
version1 = version1.upper()
version2 = version2.upper()
package_info["package"] = package
diff_record = False
if version1 != version2:
Expand Down Expand Up @@ -185,6 +187,7 @@ def main(argv=None):
else:
# Package must have been removed
version1, license1 = packages1[package]
version1 = version1.upper()
package_info["package"] = package
if len(version1) == 0:
version1 = "UNKNOWN"
Expand All @@ -202,6 +205,7 @@ def main(argv=None):
for package in packages2:
if package not in packages1:
version2, license2 = packages2[package]
version2 = version2.upper()
if len(version2) == 0:
version2 = "UNKNOWN"
if args["format"] == "text":
Expand Down
2 changes: 1 addition & 1 deletion sbomdiff/version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2024 Anthony Harrison
# SPDX-License-Identifier: Apache-2.0

VERSION: str = "0.5.5"
VERSION: str = "0.5.6"

0 comments on commit e4c8390

Please sign in to comment.