Make sure cmd is UTF8 encoded before splitting. Fixes regression introduced by 80df2135e9.

This commit is contained in:
Chris Church 2014-08-24 21:06:21 -04:00
parent a419ffdf41
commit 57dee4545b

View file

@ -103,6 +103,7 @@ class ShellModule(object):
return _encode_script(script)
def build_module_command(self, env_string, shebang, cmd, rm_tmp=None):
cmd = cmd.encode('utf-8')
cmd_parts = shlex.split(cmd, posix=False)
if not cmd_parts[0].lower().endswith('.ps1'):
cmd_parts[0] = '%s.ps1' % cmd_parts[0]