Skip to content

Commit

Permalink
fix: Restore old regex behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
jvfe committed Dec 16, 2024
1 parent 375db03 commit 63fc8cf
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions nf_core/components/components_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,11 +180,15 @@ def get_components_to_install(
components = meta["components"]
for component in components:
if isinstance(component, dict):
base_dir = nf_core.utils.determine_base_dir(subworkflow_dir)
_, repo_config = nf_core.utils.load_tools_config(base_dir)
component_name = list(component.keys())[0].lower()
git_remote = component[component_name]["git_remote"]
org_path = getattr(repo_config, "repo_path")
org_path_match = re.search(r"(?:https://|git@)[\w\.]+[:/](.*?)/", git_remote)
if org_path_match:
org_path = org_path_match.group(1)
else:
raise UserWarning(
f"The organisation path of {component_name} could not be established from '{git_remote}'"
)
current_comp_dict = subworkflows if component_name in subworkflows else modules

component_dict = {
Expand Down

0 comments on commit 63fc8cf

Please sign in to comment.