Skip to content

Commit

Permalink
Better comment
Browse files Browse the repository at this point in the history
  • Loading branch information
uranusjr committed Aug 10, 2018
1 parent 559903f commit d460a21
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pipenv/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -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#2718.
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)

Expand Down

0 comments on commit d460a21

Please sign in to comment.