File tree Expand file tree Collapse file tree 1 file changed +9
-12
lines changed
cycode/cli/apps/report_import/sbom Expand file tree Collapse file tree 1 file changed +9
-12
lines changed Original file line number Diff line number Diff line change 99from cycode .cli .utils .sentry import add_breadcrumb
1010from cycode .cyclient .import_sbom_client import ImportSbomParameters
1111
12- _Input_RICH_HELP_PANEL = 'Input options'
13-
14-
1512def sbom_command (
1613 ctx : typer .Context ,
17- input_file : Annotated [
14+ path : Annotated [
1815 Path ,
19- typer .Option (
20- '--file' ,
21- help = 'Path to an SBOM file.' ,
22- show_default = False ,
16+ typer .Argument (
17+ exists = True ,
18+ resolve_path = True ,
2319 dir_okay = False ,
2420 readable = True ,
25- rich_help_panel = _Input_RICH_HELP_PANEL ,
21+ help = 'Path to SBOM file.' ,
22+ show_default = False
2623 ),
2724 ],
2825 sbom_name : Annotated [
@@ -72,12 +69,12 @@ def sbom_command(
7269 )
7370
7471 try :
75- if not input_file .exists ():
72+ if not path .exists ():
7673 from errno import ENOENT
7774 from os import strerror
7875
79- raise FileNotFoundError (ENOENT , strerror (ENOENT ), input_file .absolute ())
76+ raise FileNotFoundError (ENOENT , strerror (ENOENT ), path .absolute ())
8077
81- client .request_sbom_import_execution (import_parameters , input_file )
78+ client .request_sbom_import_execution (import_parameters , path )
8279 except Exception as e :
8380 handle_report_exception (ctx , e )
You can’t perform that action at this time.
0 commit comments