Skip to content

Commit

Permalink
don't try running pre-commit if code-linters or github are not used i…
Browse files Browse the repository at this point in the history
…n the template
  • Loading branch information
mirpedrol committed Dec 16, 2024
1 parent 13e553f commit 3b3d940
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions nf_core/pipelines/create/create.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,10 +267,15 @@ def init_pipeline(self):
if not self.no_git:
self.git_init_pipeline()
# Run prettier on files
current_dir = Path.cwd()
os.chdir(self.outdir)
run_prettier_on_file([str(f) for f in self.outdir.glob("**/*")])
os.chdir(current_dir)
if (
self.config.skip_features is None
or "code_linters" not in self.config.skip_features
or "github" not in self.config.skip_features
):
current_dir = Path.cwd()
os.chdir(self.outdir)
run_prettier_on_file([str(f) for f in self.outdir.glob("**/*")])
os.chdir(current_dir)

if self.config.is_nfcore and not self.is_interactive:
log.info(
Expand Down

0 comments on commit 3b3d940

Please sign in to comment.