mirror of
https://github.com/kennethreitz/pipenv.git
synced 2026-06-05 22:50:18 +00:00
Fix python path discovery if not called python
- Begin a refactor of `delegator.run` invocation to ensure we capture and handle failures with our own exception wrappers - Additoinally capture output and error logging and command information when running in verbose mode (should avoid significant repitition in the codebase) - Refactor `which` and `system_which` to fallback to pythonfinder's implementation - Abstract `is_python_command` to identify whether we are looking for python, this enables us to rely on `pythonfinder.Finder.find_all_python_versions()` to ensure we aren't skipping python versions - Fixes #2783 Signed-off-by: Dan Ryan <dan@danryan.co>
This commit is contained in:
+1
-1
@@ -10,7 +10,7 @@ class ScriptEmptyError(ValueError):
|
||||
|
||||
|
||||
def _quote_if_contains(value, pattern):
|
||||
if next(re.finditer(pattern, value), None):
|
||||
if next(iter(re.finditer(pattern, value)), None):
|
||||
return '"{0}"'.format(re.sub(r'(\\*)"', r'\1\1\\"', value))
|
||||
return value
|
||||
|
||||
|
||||
Reference in New Issue
Block a user