diff --git a/nf_core/pipelines/download.py b/nf_core/pipelines/download.py index cc8b6173c..aa27b9697 100644 --- a/nf_core/pipelines/download.py +++ b/nf_core/pipelines/download.py @@ -1309,7 +1309,7 @@ def singularity_copy_cache_image(self, container: str, out_path: str, cache_path def singularity_copy_library_image(self, container: str, library_path: str, out_path: str, cache_path: Optional[str]) -> None: """Copy Singularity image from NXF_SINGULARITY_LIBRARYDIR to target folder, and possibly NXF_SINGULARITY_CACHEDIR.""" self.singularity_copy_image(container, library_path, out_path) - if cache_path: + if cache_path and not os.path.exists(cache_path): self.singularity_copy_image(container, library_path, cache_path) def singularity_copy_image(self, container: str, from_path: str, to_path: str) -> None: