From c584739b417c52d06c4b14a0e58fba620e01dc00 Mon Sep 17 00:00:00 2001 From: Dan Ryan Date: Tue, 24 Jul 2018 20:31:27 -0400 Subject: [PATCH] Handle NoneType paths Signed-off-by: Dan Ryan --- pipenv/utils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pipenv/utils.py b/pipenv/utils.py index be1240ac..286b1866 100644 --- a/pipenv/utils.py +++ b/pipenv/utils.py @@ -1367,6 +1367,8 @@ def is_virtual_environment(path): def chdir(path): """Context manager to change working directories.""" from ._compat import Path + if not path: + return prev_cwd = Path.cwd().as_posix() if isinstance(path, Path): path = path.as_posix()