From 04de369c6b3d56c0a5ebe7abbacffb9bcf9979d7 Mon Sep 17 00:00:00 2001 From: Dan Ryan Date: Mon, 23 Jul 2018 18:35:17 -0400 Subject: [PATCH] Fix windows handling of path loading Signed-off-by: Dan Ryan --- pipenv/utils.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pipenv/utils.py b/pipenv/utils.py index a721eca4..08c08381 100644 --- a/pipenv/utils.py +++ b/pipenv/utils.py @@ -945,11 +945,12 @@ def temp_path(): def load_path(python): + from ._compat import Path import delegator import json - python = escape_grouped_arguments(python) - json_dump_commmand = "'import json, sys; print(json.dumps(sys.path));'" - c = delegator.run("{0} -c {1}".format(python, json_dump_commmand)) + python = Path(python).as_posix() + json_dump_commmand = '"import json, sys; print(json.dumps(sys.path));"' + c = delegator.run('"{0}" -c {1}'.format(python, json_dump_commmand)) if c.return_code == 0: return json.loads(c.out.strip()) else: