Only join cmd if it's not a string

See https://github.com/saltstack/salt/pull/43807#discussion_r142009644
This commit is contained in:
Erik Johnson 2017-10-02 14:42:40 -05:00
parent a2161efda3
commit fe28b0d4fb
No known key found for this signature in database
GPG key ID: 5E5583C437808F3F

View file

@ -378,7 +378,8 @@ def _run(cmd,
msg = 'missing salt/utils/win_runas.py'
raise CommandExecutionError(msg)
cmd = ' '.join(cmd)
if isinstance(cmd, (list, tuple)):
cmd = ' '.join(cmd)
return win_runas(cmd, runas, password, cwd)