|
12 | 12 | from cycode.cli import consts |
13 | 13 | from cycode.cli.cli_types import SeverityOption |
14 | 14 | from cycode.cli.config import configuration_manager |
| 15 | +from cycode.cli.console import console |
15 | 16 | from cycode.cli.exceptions import custom_exceptions |
16 | 17 | from cycode.cli.exceptions.handle_scan_errors import handle_scan_exception |
17 | 18 | from cycode.cli.files_collector.excluder import exclude_irrelevant_documents_to_scan |
@@ -83,7 +84,7 @@ def scan_sca_commit_range(ctx: typer.Context, path: str, commit_range: str) -> N |
83 | 84 | scan_commit_range_documents(ctx, from_commit_documents, to_commit_documents, scan_parameters=scan_parameters) |
84 | 85 |
|
85 | 86 |
|
86 | | -def scan_disk_files(ctx: click.Context, paths: Tuple[str]) -> None: |
| 87 | +def scan_disk_files(ctx: typer.Context, paths: Tuple[str]) -> None: |
87 | 88 | scan_type = ctx.obj['scan_type'] |
88 | 89 | progress_bar = ctx.obj['progress_bar'] |
89 | 90 |
|
@@ -642,7 +643,7 @@ def parse_pre_receive_input() -> str: |
642 | 643 | return pre_receive_input.splitlines()[0] |
643 | 644 |
|
644 | 645 |
|
645 | | -def _get_default_scan_parameters(ctx: click.Context) -> dict: |
| 646 | +def _get_default_scan_parameters(ctx: typer.Context) -> dict: |
646 | 647 | return { |
647 | 648 | 'monitor': ctx.obj.get('monitor'), |
648 | 649 | 'report': ctx.obj.get('report'), |
@@ -916,7 +917,7 @@ def _try_get_report_url_if_needed( |
916 | 917 | logger.debug('Failed to get report URL', exc_info=e) |
917 | 918 |
|
918 | 919 |
|
919 | | -def _set_aggregation_report_url(ctx: click.Context, aggregation_report_url: Optional[str] = None) -> None: |
| 920 | +def _set_aggregation_report_url(ctx: typer.Context, aggregation_report_url: Optional[str] = None) -> None: |
920 | 921 | ctx.obj['aggregation_report_url'] = aggregation_report_url |
921 | 922 |
|
922 | 923 |
|
@@ -1007,7 +1008,7 @@ def _normalize_file_path(path: str) -> str: |
1007 | 1008 |
|
1008 | 1009 | def perform_post_pre_receive_scan_actions(ctx: typer.Context) -> None: |
1009 | 1010 | if scan_utils.is_scan_failed(ctx): |
1010 | | - click.echo(consts.PRE_RECEIVE_REMEDIATION_MESSAGE) |
| 1011 | + console.print(consts.PRE_RECEIVE_REMEDIATION_MESSAGE) |
1011 | 1012 |
|
1012 | 1013 |
|
1013 | 1014 | def enable_verbose_mode(ctx: typer.Context) -> None: |
|
0 commit comments