mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-01 22:09:08 -07:00
allow shell plugin to affect remote module filename
Fix for 13368, added get_remote_filename to shell plugins, powershell version appends .ps1 if necessary, base shell plugin no-ops
This commit is contained in:
parent
f873cc0fb5
commit
c94509f273
4 changed files with 13 additions and 6 deletions
|
@ -301,11 +301,6 @@ class Connection(ConnectionBase):
|
|||
}}
|
||||
'''
|
||||
|
||||
# FUTURE: this sucks- why can't the module/shell stuff do this?
|
||||
with open(in_path, 'r') as temp_file:
|
||||
if temp_file.read(15).lower().startswith('#!powershell') and not out_path.lower().endswith('.ps1'):
|
||||
out_path = out_path + '.ps1'
|
||||
|
||||
script = script_template.format(self._shell._escape(out_path))
|
||||
cmd_parts = self._shell._encode_script(script, as_list=True, strict_mode=False)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue