Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

* Added better logging message if a user doesn't specificy the directory correctly with `nf-core modules` commands [[#942](https://github.com/nf-core/tools/pull/942)]
* Fixed parameter validation bug caused by JSONObject [[#937](https://github.com/nf-core/tools/issues/937)]
* Fixed template creation error regarding file permissions [[#932](https://github.com/nf-core/tools/issues/932)]
* Split the `create-lint-wf` tests up into separate steps in GitHub Actions to make the CI results easier to read
* Added automated PR comments to the Markdownlint and Python Black lint CI tests to explain failures

Expand Down
4 changes: 4 additions & 0 deletions nf_core/create.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,10 @@ def render_template(self):
shutil.copy(template_fn_path, output_path)
continue

# Mirror file permissions
template_stat = os.stat(template_fn_path)
os.chmod(output_path, template_stat.st_mode)

# Make a logo and save it
self.make_pipeline_logo()

Expand Down
4 changes: 4 additions & 0 deletions nf_core/modules/create.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,10 @@ def render_template(self):
log.debug(f"Writing output to: '{dest_fn}'")
fh.write(rendered_output)

# Mirror file permissions
template_stat = os.stat(os.path.join("nf_core", "module-template", template_fn))
os.chmod(dest_fn, template_stat.st_mode)

def get_repo_type(self, directory):
"""
Determine whether this is a pipeline repository or a clone of
Expand Down