From f6cb3ed7b1f7079bec6a7c70614b5aaa572dc721 Mon Sep 17 00:00:00 2001 From: kevinmenden Date: Thu, 8 Jul 2021 14:12:42 +0200 Subject: [PATCH] don't exit when no commit is found --- nf_core/modules/module_utils.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nf_core/modules/module_utils.py b/nf_core/modules/module_utils.py index d188e6d8b6..24172fb4eb 100644 --- a/nf_core/modules/module_utils.py +++ b/nf_core/modules/module_utils.py @@ -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)