Skip to content

Commit

Permalink
refact: Reverse check order
Browse files Browse the repository at this point in the history
  • Loading branch information
jvfe committed Sep 30, 2024
1 parent 5504e8a commit d385b2a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions nf_core/components/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ def install(self, component: Union[str, Dict[str, str]], silent: bool = False) -
self.modules_repo = ModulesRepo(remote_url, branch)
component = component["name"]

if self.current_remote != self.modules_repo.remote_url and self.sha is not None:
self.current_sha = None
else:
if self.current_remote == self.modules_repo.remote_url and self.sha is not None:
self.current_sha = self.sha
else:
self.current_sha = None

if self.repo_type == "modules":
log.error(f"You cannot install a {component} in a clone of nf-core/modules")
Expand Down

0 comments on commit d385b2a

Please sign in to comment.