mirror of
https://github.com/kennethreitz/pipenv.git
synced 2026-06-05 22:50:18 +00:00
Ensure that we use posix style strings instead of Path objects for chdir context manager
Signed-off-by: Dan Ryan <dan@danryan.co>
This commit is contained in:
+3
-1
@@ -1367,7 +1367,9 @@ def is_virtual_environment(path):
|
||||
def chdir(path):
|
||||
"""Context manager to change working directories."""
|
||||
from ._compat import Path
|
||||
prev_cwd = Path.cwd()
|
||||
prev_cwd = Path.cwd().as_posix()
|
||||
if isinstance(path, Path):
|
||||
path = path.as_posix()
|
||||
os.chdir(str(path))
|
||||
try:
|
||||
yield
|
||||
|
||||
Reference in New Issue
Block a user