mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
Move binary module detection into executor/module_common.py
This commit is contained in:
@@ -165,6 +165,7 @@ class ShellBase(object):
|
||||
# don't quote the cmd if it's an empty string, because this will break pipelining mode
|
||||
if cmd.strip() != '':
|
||||
cmd = pipes.quote(cmd)
|
||||
|
||||
cmd_parts = []
|
||||
if shebang:
|
||||
shebang = shebang.replace("#!", "").strip()
|
||||
|
||||
@@ -54,8 +54,8 @@ class ShellModule(object):
|
||||
return path
|
||||
return '\'%s\'' % path
|
||||
|
||||
# powershell requires that script files end with .ps1
|
||||
def get_remote_filename(self, pathname):
|
||||
# powershell requires that script files end with .ps1
|
||||
base_name = os.path.basename(pathname.strip())
|
||||
name, ext = os.path.splitext(base_name.strip())
|
||||
if ext.lower() not in ['.ps1', '.exe']:
|
||||
|
||||
Reference in New Issue
Block a user