Revert "only set executable from shell if not set already"

Reverted as this is a fix for 55135c0825
which is being reverted for breakage

This reverts commit e506b5da14.
pull/31368/head
Toshio Kuratomi 8 years ago
parent 19c6fe9a78
commit b15ff222b1

@ -2603,7 +2603,7 @@ class AnsibleModule(object):
if isinstance(args, list):
if use_unsafe_shell:
args = " ".join([shlex_quote(x) for x in args])
args = " ".join([pipes.quote(x) for x in args])
shell = True
elif isinstance(args, (binary_type, text_type)) and use_unsafe_shell:
shell = True
@ -2622,8 +2622,7 @@ class AnsibleModule(object):
shell = False
if use_unsafe_shell:
if executable is None:
executable = os.environ.get('SHELL')
executable = os.environ.get('SHELL')
if executable:
args = [executable, '-c', args]
else:

Loading…
Cancel
Save