Strip trailing / from GitHub repo name

This commit is contained in:
Michal Sojka 2024-09-15 14:37:37 +02:00
parent 6ba6c8a2c2
commit bff08f3718

View file

@ -286,7 +286,7 @@ def ros2nix(args):
)
git_cache[toplevel] = info
match = re.match("https://github.com/(?P<owner>[^/]*)/(?P<repo>.*?)(.git)?$", url)
match = re.match("https://github.com/(?P<owner>[^/]*)/(?P<repo>.*?)(.git|/.*)?$", url)
if match is not None:
kwargs["src_param"] = "fetchFromGitHub"
kwargs["src_expr"] = dedent(f'''