Skip to content

Commit

Permalink
nf_core.utils.get_repo_releases_branches() - return pipeline name.
Browse files Browse the repository at this point in the history
Sometimes we add the nf-core/ prefix to the pipeline name, so return that too.
  • Loading branch information
ewels committed May 6, 2021
1 parent ea32219 commit 8d4fc0e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
4 changes: 3 additions & 1 deletion nf_core/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,9 @@ def download_workflow(self):
# Get workflow details
try:
self.prompt_pipeline_name()
self.wf_releases, self.wf_branches = nf_core.utils.get_repo_releases_branches(self.pipeline, self.wfs)
self.pipeline, self.wf_releases, self.wf_branches = nf_core.utils.get_repo_releases_branches(
self.pipeline, self.wfs
)
self.prompt_release()
self.get_release_hash()
self.prompt_container_download()
Expand Down
4 changes: 3 additions & 1 deletion nf_core/launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,9 @@ def get_pipeline_schema(self):

if not self.pipeline_revision:
try:
wf_releases, wf_branches = nf_core.utils.get_repo_releases_branches(self.pipeline, self.wfs)
self.pipeline, wf_releases, wf_branches = nf_core.utils.get_repo_releases_branches(
self.pipeline, self.wfs
)
except AssertionError as e:
log.error(e)
return False
Expand Down
3 changes: 2 additions & 1 deletion nf_core/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -711,4 +711,5 @@ def get_repo_releases_branches(pipeline, wfs):
):
wf_branches[branch["name"]] = branch["commit"]["sha"]

return wf_releases, wf_branches
# Return pipeline again in case we added the nf-core/ prefix
return pipeline, wf_releases, wf_branches

0 comments on commit 8d4fc0e

Please sign in to comment.