Skip to content

Commit 72407b0

Browse files
committed
make _should_use_sync_flow silent
1 parent e39e449 commit 72407b0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

cycode/cli/apps/scan/code_scanner.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,9 @@ def set_issue_detected_by_scan_results(ctx: typer.Context, scan_results: List[Lo
103103
def _should_use_sync_flow(command_scan_type: str, scan_type: str, sync_option: bool) -> bool:
104104
"""Decide whether to use sync flow or async flow for the scan.
105105
106+
Note:
107+
Passing `--sync` option does not mean that sync flow will be used in all cases.
108+
106109
The logic:
107110
- for IAC scan, sync flow is always used
108111
- for SAST scan, sync flow is not supported
@@ -112,7 +115,7 @@ def _should_use_sync_flow(command_scan_type: str, scan_type: str, sync_option: b
112115
return False
113116

114117
if command_scan_type not in {'path', 'repository'}:
115-
raise ValueError(f'Sync flow is not available for "{command_scan_type}" command type. Remove --sync option.')
118+
return False
116119

117120
if scan_type == consts.IAC_SCAN_TYPE:
118121
# sync in the only available flow for IAC scan; we do not use detector directly anymore

0 commit comments

Comments
 (0)