diff --git a/runway/core/components/_module_path.py b/runway/core/components/_module_path.py index bdc471fc2..60124812a 100644 --- a/runway/core/components/_module_path.py +++ b/runway/core/components/_module_path.py @@ -37,7 +37,7 @@ class ModulePath: ARGS_REGEX: ClassVar[str] = r"(\?)(?P.*)$" REMOTE_SOURCE_HANDLERS: ClassVar[Dict[str, Type[Source]]] = {"git": Git} SOURCE_REGEX: ClassVar[str] = r"(?P[a-z]+)(\:\:)" - URI_REGEX: ClassVar[str] = r"(?P[a-z]+://[a-zA-Z0-9\./]+?(?=//|\?|$))" + URI_REGEX: ClassVar[str] = r"(?P[a-z]+://[a-zA-Z0-9\./-]+?(?=//|\?|$))" def __init__( self, diff --git a/tests/unit/core/components/test_module_path.py b/tests/unit/core/components/test_module_path.py index 2db1fe9ea..a005666a2 100644 --- a/tests/unit/core/components/test_module_path.py +++ b/tests/unit/core/components/test_module_path.py @@ -37,6 +37,15 @@ ) TESTS: List[TypeDefTestDefinition] = [ + { + "definition": "git::git://github.com/onicagroup/foo/foo-bar.git", + "expected": { + "location": "./", + "arguments": {}, + "source": "git", + "uri": "git://github.com/onicagroup/foo/foo-bar.git", + }, + }, { "definition": "git::git://github.com/onicagroup/foo/bar.git", "expected": {