Skip to content

Commit

Permalink
Merge pull request #1174 from KevinMenden/more-robust-modules-install
Browse files Browse the repository at this point in the history
Don't exit `modules install` when no commit hash is found
  • Loading branch information
KevinMenden authored Jul 8, 2021
2 parents 1408310 + f6cb3ed commit b6542c8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions nf_core/modules/module_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,9 @@ def create_modules_json(pipeline_dir):

modules_json["repos"][repo_name][module_name] = {"git_sha": correct_commit_sha}
except (UserWarning, LookupError) as e:
log.error(e)
raise UserWarning("Will not create 'modules.json' file")
log.warn(
f"Could not fetch 'git_sha' for module: '{module_name}'. Please try to install a newer version of this module. ({e})"
)
modules_json_path = os.path.join(pipeline_dir, "modules.json")
with open(modules_json_path, "w") as fh:
json.dump(modules_json, fh, indent=4)
Expand Down

0 comments on commit b6542c8

Please sign in to comment.