Skip to content

Commit

Permalink
Merge pull request #2281 from adamrtalbot/fix_quay.io_detection
Browse files Browse the repository at this point in the history
Fix quay.io detection in simple docker names
  • Loading branch information
drpatelh authored May 5, 2023
2 parents 41b4dfc + 0981732 commit 1edabeb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
### Linting

- Warn if container access is denied ([#2270](https://github.com/nf-core/tools/pull/2270))
- Detect if container is 'simple name' and try to contact quay.io server by default ([#2281](https://github.com/nf-core/tools/pull/2281))

### Modules

Expand Down
5 changes: 3 additions & 2 deletions nf_core/modules/lint/main_nf.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,8 +290,9 @@ def check_process_section(self, lines, fix_version, progress_bar):
else:
self.failed.append(("docker_tag", "Unable to parse docker tag", self.main_nf))
docker_tag = None
if l.startswith("biocontainers/"):
# When we think it is a biocontainer, assume we are querying quay.io/biocontainers and insert quay.io as prefix
# Guess if container name is simple one (e.g. nfcore/ubuntu:20.04)
# If so, add quay.io as default container prefix
if l.count("/") == 1 and l.count(":") == 1:
l = "quay.io/" + l
url = urlparse(l.split("'")[0])
# lint double quotes
Expand Down

0 comments on commit 1edabeb

Please sign in to comment.