From d385b2a02708cfeb9771b4ad4bca2831a260618d Mon Sep 17 00:00:00 2001 From: jvfe Date: Mon, 30 Sep 2024 13:07:28 -0300 Subject: [PATCH] refact: Reverse check order --- nf_core/components/install.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nf_core/components/install.py b/nf_core/components/install.py index 36b511d22..a7e21395c 100644 --- a/nf_core/components/install.py +++ b/nf_core/components/install.py @@ -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")