From 1fd21857e1c18436fa47a1fbc3f95a664e7e963e Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Tue, 13 Feb 2018 14:10:38 -0500 Subject: [PATCH] make check work with --system more Signed-off-by: Kenneth Reitz --- pipenv/core.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pipenv/core.py b/pipenv/core.py index 2dccee92..fa6b849f 100644 --- a/pipenv/core.py +++ b/pipenv/core.py @@ -2063,8 +2063,13 @@ def do_check(three=None, python=False, system=False, unused=False, style=False, crayons.normal(u'Checking PEP 508 requirements…', bold=True) ) + if system: + python = system_which('python') + else: + python = which('python') + # Run the PEP 508 checker in the virtualenv. - c = delegator.run('"{0}" {1}'.format(which('python'), shellquote(pep508checker.__file__.rstrip('cdo')))) + c = delegator.run('"{0}" {1}'.format(python, shellquote(pep508checker.__file__.rstrip('cdo')))) results = simplejson.loads(c.out) # Load the pipfile.