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:
nitzmahone 2015-12-01 13:39:02 -08:00
parent f873cc0fb5
commit c94509f273
4 changed files with 13 additions and 6 deletions

View file

@ -49,6 +49,13 @@ class ShellModule(object):
return path
return '"%s"' % path
# powershell requires that script files end with .ps1
def get_remote_filename(self, base_name):
if not base_name.strip().lower().endswith('.ps1'):
return base_name.strip() + '.ps1'
return base_name.strip()
def path_has_trailing_slash(self, path):
# Allow Windows paths to be specified using either slash.
path = self._unquote(path)