Skip to content

Commit 045b904

Browse files
authored
Merge branch 'main' into issue-774-unhashable-type
2 parents 431446d + e0c83cd commit 045b904

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/spdx_tools/spdx/clitools/pyspdxtools.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,10 @@ def main(infile: str, outfile: str, version: str, novalidation: bool, graph: boo
113113
logging.error(log_string)
114114
sys.exit(1)
115115

116+
except FileNotFoundError as err:
117+
logging.error(f"{err.strerror}: {err.filename}")
118+
sys.exit(1)
119+
116120

117121
if __name__ == "__main__":
118122
main()

tests/spdx/test_cli.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ def test_cli_with_system_exit_code_0(options):
4242
"data/invalid/spdx-trivy-vmware_log-intelligence-fluentd-sha256_086af034f561f343f633be9d9f9e95f65ae6c61b8ddb2c6755ef5bb25b40f53a.json", # noqa: E501
4343
),
4444
),
45+
("-i", "non_existent_file.spdx"),
4546
],
4647
)
4748
def test_cli_with_system_exit_code_1(options):

0 commit comments

Comments
 (0)