Skip to content

Commit

Permalink
fix: Remove mention of component_name
Browse files Browse the repository at this point in the history
  • Loading branch information
jvfe committed Oct 24, 2024
1 parent 484bea4 commit 885e27b
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions nf_core/components/update.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,15 +96,12 @@ def update(self, component=None, silent=False, updated=None, check_diff_exist=Tr
Returns:
(bool): True if the update was successful, False otherwise.
"""
if isinstance(component, str):
component = {"name": component, "git_remote": self.current_remote, "branch": self.branch}

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"]
component = component["name"]

if self.current_remote == self.modules_repo.remote_url and self.sha is not None:
self.current_sha = self.sha
Expand Down Expand Up @@ -144,7 +141,7 @@ def update(self, component=None, silent=False, updated=None, check_diff_exist=Tr

# Get the list of modules/subworkflows to update, and their version information
components_info = (
self.get_all_components_info() if self.update_all else [self.get_single_component_info(component_name)]
self.get_all_components_info() if self.update_all else [self.get_single_component_info(component)]
)
# Save the current state of the modules.json
old_modules_json = self.modules_json.get_modules_json()
Expand Down

0 comments on commit 885e27b

Please sign in to comment.