Skip to content

Commit

Permalink
only warn valid directory if pipeline is not nf-core
Browse files Browse the repository at this point in the history
  • Loading branch information
mirpedrol committed Oct 24, 2022
1 parent 5b8ed27 commit daf5da9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion nf_core/modules/modules_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit daf5da9

Please sign in to comment.