From 625d642f63a1169938f9d0563b95e29bf2b1805e Mon Sep 17 00:00:00 2001 From: Erin O'Connell Date: Thu, 7 Sep 2017 22:12:49 -0600 Subject: [PATCH] fixed shellquote on windows --- pipenv/__version__.py | 2 +- pipenv/cli.py | 8 ++++++-- pipenv/utils.py | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/pipenv/__version__.py b/pipenv/__version__.py index 2251d726..ccc03aa0 100644 --- a/pipenv/__version__.py +++ b/pipenv/__version__.py @@ -3,4 +3,4 @@ # //___/ / / / //___/ / // // / / || / / # // / / // ((____ // / / ||/ / -__version__ = '6.1.5' +__version__ = '6.1.6' diff --git a/pipenv/cli.py b/pipenv/cli.py index 39ead9c2..5bc706b0 100644 --- a/pipenv/cli.py +++ b/pipenv/cli.py @@ -501,7 +501,7 @@ def get_downloads_info(names_map, section): def do_lock(no_hashes=True, verbose=False, legacy=False): """Executes the freeze functionality.""" - + print(no_hashes, verbose, legacy) if not legacy: # Alert the user of progress. click.echo(crayons.yellow('Locking {0} dependencies...'.format(crayons.red('[dev-packages]'))), err=True) @@ -580,7 +580,11 @@ def do_lock(no_hashes=True, verbose=False, legacy=False): lockfile['default'][dep['name']]['hashes'] = dep['hashes'] # Run the PEP 508 checker in the virtualenv, add it to the lockfile. - c = delegator.run('"{0}" {1}'.format(which('python'), shellquote(pep508checker.__file__.rstrip('cdo')))) + cmd = '"{0}" {1}'.format(which('python'), shellquote(pep508checker.__file__.rstrip('cdo'))) + c = delegator.run(cmd) + # print("Cmd: {0}".format(cmd)) + # print("Return Code: {0}".format(c.return_code)) + # print("Out: {0}".format(c.out)) lockfile['_meta']['host-environment-markers'] = json.loads(c.out) # Write out the lockfile. diff --git a/pipenv/utils.py b/pipenv/utils.py index 51cefd20..139a5531 100644 --- a/pipenv/utils.py +++ b/pipenv/utils.py @@ -23,7 +23,7 @@ class PipCommand(pip.basecommand.Command): def shellquote(s): - return "'" + s.replace("'", "'\\''") + "'" + return '"' + s.replace("'", "'\\''") + '"' def clean_pkg_version(version):