diff --git a/src/poetry/core/vcs/git.py b/src/poetry/core/vcs/git.py index 28f1fd28c..cae85729f 100644 --- a/src/poetry/core/vcs/git.py +++ b/src/poetry/core/vcs/git.py @@ -14,7 +14,7 @@ USER = r"[a-zA-Z0-9_.-]+" RESOURCE = r"[a-zA-Z0-9_.-]+" PORT = r"\d+" -PATH = r"[\w~.\-/\\]+" +PATH = r"[\w~.\-/\\\$]+" NAME = r"[\w~.\-]+" REV = r"[^@#]+?" SUBDIR = r"[\w\-/\\]+" diff --git a/tests/vcs/test_vcs.py b/tests/vcs/test_vcs.py index cf7563a6b..3c18b54c1 100644 --- a/tests/vcs/test_vcs.py +++ b/tests/vcs/test_vcs.py @@ -86,6 +86,12 @@ "git+file://C:\\Users\\hello\\testing.git#zkat/windows-files", GitUrl("file://C:\\Users\\hello\\testing.git", "zkat/windows-files", None), ), + # hidden directories on Windows ues $ in their path + # python-poetry/poetry#5493 + ( + "git+file://C:\\Users\\hello$\\testing.git#zkat/windows-files", + GitUrl("file://C:\\Users\\hello$\\testing.git", "zkat/windows-files", None), + ), ( "git+https://git.example.com/sdispater/project/my_repo.git", GitUrl("https://git.example.com/sdispater/project/my_repo.git", None, None),