From 79bedb1ffb663452b646d92fc56d6c890f993822 Mon Sep 17 00:00:00 2001 From: Dan Ryan Date: Wed, 7 Mar 2018 15:52:13 -0500 Subject: [PATCH] Shellquote sys.executable when passing to shell --- pipenv/core.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pipenv/core.py b/pipenv/core.py index fa9d457f..96c5feb7 100644 --- a/pipenv/core.py +++ b/pipenv/core.py @@ -937,7 +937,7 @@ def do_create_virtualenv(python=None, site_packages=False): cmd.append('--system-site-packages') else: # Default: use pew. - cmd = [sys.executable, '-m', 'pipenv.pew', 'new', project.virtualenv_name, '-d'] + cmd = [shellquote(sys.executable), '-m', 'pipenv.pew', 'new', project.virtualenv_name, '-d'] # Pass a Python version to virtualenv, if needed. if python: @@ -2074,7 +2074,7 @@ def do_shell(three=None, python=False, fancy=False, shell_args=None): else: workon_name = project.virtualenv_name - cmd = sys.executable + cmd = shellquote(sys.executable) args = ['-m', 'pipenv.pew', 'workon', workon_name] # Grab current terminal dimensions to replace the hardcoded default