From daf5da9a34630aba3e0c1019a1371deec0f5b904 Mon Sep 17 00:00:00 2001 From: mirpedrol Date: Mon, 24 Oct 2022 13:18:38 +0200 Subject: [PATCH] only warn valid directory if pipeline is not nf-core --- nf_core/modules/modules_command.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nf_core/modules/modules_command.py b/nf_core/modules/modules_command.py index 83705a0bb7..af361718a4 100644 --- a/nf_core/modules/modules_command.py +++ b/nf_core/modules/modules_command.py @@ -64,7 +64,9 @@ def has_valid_directory(self): main_nf = os.path.join(self.dir, "main.nf") nf_config = os.path.join(self.dir, "nextflow.config") if not os.path.exists(main_nf) and not os.path.exists(nf_config): - raise UserWarning(f"Could not find a 'main.nf' or 'nextflow.config' file in '{self.dir}'") + if Path(self.dir).resolve().parts[-1].startswith("nf-core"): + raise UserWarning(f"Could not find a 'main.nf' or 'nextflow.config' file in '{self.dir}'") + log.warning(f"Could not find a 'main.nf' or 'nextflow.config' file in '{self.dir}'") return True def has_modules_file(self):