Skip to content

Commit 1c39dd1

Browse files
authored
CM-41217 - Fix restore file in monitor SCA scanning (#263)
1 parent d86fd46 commit 1c39dd1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cycode/cli/files_collector/sca/base_restore_dependencies.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ def get_manifest_file_path(self, document: Document) -> str:
5555
def try_restore_dependencies(self, document: Document) -> Optional[Document]:
5656
manifest_file_path = self.get_manifest_file_path(document)
5757
restore_file_path = build_dep_tree_path(document.absolute_path, self.get_lock_file_name())
58+
relative_restore_file_path = build_dep_tree_path(document.path, self.get_lock_file_name())
5859
working_directory_path = self.get_working_directory(document)
5960

6061
if self.verify_restore_file_already_exist(restore_file_path):
@@ -70,7 +71,7 @@ def try_restore_dependencies(self, document: Document) -> Optional[Document]:
7071
)
7172
restore_file_content = get_file_content(restore_file_path)
7273

73-
return Document(restore_file_path, restore_file_content, self.is_git_diff)
74+
return Document(relative_restore_file_path, restore_file_content, self.is_git_diff)
7475

7576
def get_working_directory(self, document: Document) -> Optional[str]:
7677
return None

0 commit comments

Comments
 (0)