Skip to content

Commit e354791

Browse files
committed
Add missing as_posix() calls
As PR python-poetry#2398 changed package.root_dir from str to Path, we need to call as_posix() to it convert to str before passing to os.path.join.
1 parent 65e5068 commit e354791

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: poetry/installation/pip_installer.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ def requirement(self, package, formatted=False):
143143

144144
if package.source_type in ["file", "directory"]:
145145
if package.root_dir:
146-
req = os.path.join(package.root_dir, package.source_url)
146+
req = os.path.join(package.root_dir.as_posix(), package.source_url)
147147
else:
148148
req = os.path.realpath(package.source_url)
149149

@@ -184,7 +184,7 @@ def install_directory(self, package):
184184
from poetry.utils.toml_file import TomlFile
185185

186186
if package.root_dir:
187-
req = os.path.join(package.root_dir, package.source_url)
187+
req = os.path.join(package.root_dir.as_posix(), package.source_url)
188188
else:
189189
req = os.path.realpath(package.source_url)
190190

0 commit comments

Comments
 (0)