Skip to content

Commit

Permalink
Don't assume manifest will be set in the nextflow config.
Browse files Browse the repository at this point in the history
  • Loading branch information
ewels committed Mar 15, 2022
1 parent 333a451 commit ec3b0a4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
* Fail linting if a md5sum for an empty file is found (instead of a warning)
* Don't skip the md5 when generating a test file if an empty file is found (so that linting fails and can be manually checked)
* Linting checks test files for `TODO` statements as well as the main module code ([#1271](https://github.com/nf-core/tools/issues/1271))
* Handle error if `manifest` isn't set in `nextflow.config` ([#1418](https://github.com/nf-core/tools/issues/1418))

## [v2.2 - Lead Liger](https://github.com/nf-core/tools/releases/tag/2.2) - [2021-12-14]

Expand Down
4 changes: 2 additions & 2 deletions nf_core/modules/module_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ def create_modules_json(pipeline_dir):
pipeline_dir (str): The directory where the `modules.json` should be created
"""
pipeline_config = nf_core.utils.fetch_wf_config(pipeline_dir)
pipeline_name = pipeline_config["manifest.name"]
pipeline_url = pipeline_config["manifest.homePage"]
pipeline_name = pipeline_config.get("manifest.name", "")
pipeline_url = pipeline_config.get("manifest.homePage", "")
modules_json = {"name": pipeline_name.strip("'"), "homePage": pipeline_url.strip("'"), "repos": dict()}
modules_dir = f"{pipeline_dir}/modules"

Expand Down

0 comments on commit ec3b0a4

Please sign in to comment.