mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Issue #9265: Incorrect name passed as arg[0] when shell=True
and executable specified.
This commit is contained in:
parent
f4ebe2e8a0
commit
9542cc6eb5
2 changed files with 21 additions and 0 deletions
|
@ -1073,6 +1073,8 @@ class Popen(object):
|
|||
|
||||
if shell:
|
||||
args = ["/bin/sh", "-c"] + args
|
||||
if executable:
|
||||
args[0] = executable
|
||||
|
||||
if executable is None:
|
||||
executable = args[0]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue