Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cycode/cli/apps/scan/scan_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,8 @@ def scan_command(
ctx.obj['monitor'] = monitor
ctx.obj['maven_settings_file'] = maven_settings_file
ctx.obj['report'] = report
ctx.obj['gradle_all_sub_projects'] = gradle_all_sub_projects
ctx.obj['no_restore'] = no_restore

scan_client = get_scan_cycode_client(ctx)
ctx.obj['client'] = scan_client
Expand All @@ -167,8 +169,6 @@ def scan_command(
console_printer = ctx.obj['console_printer']
console_printer.enable_recording(export_type, export_file)

_ = no_restore, gradle_all_sub_projects # they are actually used; via ctx.params

_sca_scan_to_context(ctx, sca_scan)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def __init__(
self.projects = self.get_all_projects() if self.is_gradle_sub_projects() else projects

def is_gradle_sub_projects(self) -> bool:
return self.ctx.params.get('gradle_all_sub_projects', False)
return self.ctx.obj.get('gradle_all_sub_projects', False)

def is_project(self, document: Document) -> bool:
return document.path.endswith(BUILD_GRADLE_FILE_NAME) or document.path.endswith(BUILD_GRADLE_KTS_FILE_NAME)
Expand Down
2 changes: 1 addition & 1 deletion cycode/cli/files_collector/sca/sca_file_collector.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,6 @@ def _add_dependencies_tree_documents(
def add_sca_dependencies_tree_documents_if_needed(
ctx: typer.Context, scan_type: str, documents_to_scan: list[Document], is_git_diff: bool = False
) -> None:
no_restore = ctx.params.get('no_restore', False)
no_restore = ctx.obj.get('no_restore', False)
if scan_type == consts.SCA_SCAN_TYPE and not no_restore:
_add_dependencies_tree_documents(ctx, documents_to_scan, is_git_diff)
Loading