Adding _cmd_quote to handle cases when the current working directory for cmd.script might have a space in it.

This commit is contained in:
Gareth J. Greenaway 2017-12-21 15:11:28 -08:00
parent f41adfc913
commit 8dfcf71b08
No known key found for this signature in database
GPG key ID: 10B62F8A7CAD7A41

View file

@ -2146,6 +2146,9 @@ def script(source,
if not salt.utils.is_windows():
os.chmod(path, 320)
os.chown(path, __salt__['file.user_to_uid'](runas), -1)
path = _cmd_quote(path)
ret = _run(path + ' ' + str(args) if args else path,
cwd=cwd,
stdin=stdin,