From de5e51b6c3df5bc469475235c50ae313289c4ab7 Mon Sep 17 00:00:00 2001 From: Arun Babu Neelicattu Date: Mon, 2 May 2022 09:04:35 -0500 Subject: [PATCH] vcs: allow hidden directories on Windows bare repos Resolves: python-poetry/poetry#5493 --- src/poetry/core/vcs/git.py | 2 +- tests/vcs/test_vcs.py | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) 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),