Skip to content

Commit

Permalink
Add info message with suggestion how to add the explicit library to t…
Browse files Browse the repository at this point in the history
…he registries to test.
  • Loading branch information
MatthiasZepper committed Aug 17, 2023
1 parent a4455f9 commit af987f0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions nf_core/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -1238,9 +1238,15 @@ def singularity_pull_image(self, container, out_path, cache_path, library, progr

# Sometimes, container still contain an explicit library specification, which
# results in attempted pulls e.g. from docker://quay.io/quay.io/qiime2/core:2022.11
# Thus, we trim whatever precedes the base image specification, but also
# issue a warning about that behavior.
container_parts = container.split("/")
if len(container_parts) > 2:
container = "/".join(container_parts[-2:])
found_library = container_parts[-3]
log.info(
f'Found explicit container library specification {found_library}.\n Upon pull failure, retry the download with [bright_magenta] -l "{found_library}"[/]'
)

# Pull using singularity
address = f"docker://{library}/{container.replace('docker://', '')}"
Expand Down

0 comments on commit af987f0

Please sign in to comment.