From 87ab5e8a9388bf0a5dfeba3d95810a51b07eb39c Mon Sep 17 00:00:00 2001 From: Tzu-ping Chung Date: Fri, 10 Aug 2018 13:15:33 +0800 Subject: [PATCH] Better comment --- pipenv/core.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pipenv/core.py b/pipenv/core.py index 9a74bd9a..86e22711 100644 --- a/pipenv/core.py +++ b/pipenv/core.py @@ -2097,14 +2097,15 @@ def _launch_windows_subprocess(script): if not command: return subprocess.Popen(script.cmdify(), shell=True, **options) - # Try to use CreateProcess directly if possible. + # Try to use CreateProcess directly if possible. Specifically catch + # Windows error 193 "Command is not a valid Win32 application" to handle + # a "command" that is non-executable. See pypa/pipenv#2727. try: return subprocess.Popen([command] + script.args, **options) except WindowsError as e: if e.winerror != 193: raise - # Windows error 193 "Command is not a valid Win32 application". # Try shell mode to use Windows's file association for file launch. return subprocess.Popen(script.cmdify(), shell=True, **options)