Skip to content

Commit

Permalink
refact: Re-add isinstance dict
Browse files Browse the repository at this point in the history
  • Loading branch information
jvfe committed Oct 24, 2024
1 parent c3b6acc commit 484bea4
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions nf_core/components/update.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,12 @@ def update(self, component=None, silent=False, updated=None, check_diff_exist=Tr
if isinstance(component, str):
component = {"name": component, "git_remote": self.current_remote, "branch": self.branch}

# Override modules_repo when the component to install is a dependency from a subworkflow.
remote_url = component.get("git_remote", self.current_remote)
branch = component.get("branch", self.branch)
self.modules_repo = ModulesRepo(remote_url, branch)
component_name = component["name"]
if isinstance(component, dict):
# Override modules_repo when the component to install is a dependency from a subworkflow.
remote_url = component.get("git_remote", self.current_remote)
branch = component.get("branch", self.branch)
self.modules_repo = ModulesRepo(remote_url, branch)
component_name = component["name"]

if self.current_remote == self.modules_repo.remote_url and self.sha is not None:
self.current_sha = self.sha
Expand Down

0 comments on commit 484bea4

Please sign in to comment.