Skip to content

Commit

Permalink
refact: Set git remote beforehand
Browse files Browse the repository at this point in the history
  • Loading branch information
jvfe committed Nov 7, 2024
1 parent 4225272 commit e72de2f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions nf_core/components/update.py
Original file line number Diff line number Diff line change
Expand Up @@ -884,12 +884,14 @@ def get_components_to_update(self, component):
if self.component_type == "modules":
# All subworkflow names in the installed_by section of a module are subworkflows using this module
# We need to update them too
git_remote = self.current_remote
for subworkflow in installed_by:
if subworkflow != component and subworkflow != self.component_type:
if subworkflow != component:
for remote_url, content in mods_json["repos"].items():
if (all_subworkflows := content.get("subworkflows")) is not None:
for _, details in all_subworkflows.items():
git_remote = remote_url if subworkflow in details else self.current_remote
if subworkflow in details:
git_remote = remote_url
break
if subworkflow != self.component_type:
subworkflows_to_update.append({"name": subworkflow, "git_remote": git_remote})
Expand Down

0 comments on commit e72de2f

Please sign in to comment.