use a specific path for just the cmd._run call

This commit is contained in:
Ch3LL 2018-08-01 15:03:46 -04:00
parent 62c66ba489
commit 391bb8a411
No known key found for this signature in database
GPG key ID: 132B55A7C13EFA73

View file

@ -2128,11 +2128,11 @@ def script(source,
os.chown(path, __salt__['file.user_to_uid'](runas), -1)
if salt.utils.is_windows() and shell.lower() != 'powershell':
path = _cmd_quote(path, escape=False)
cmd_path = _cmd_quote(path, escape=False)
else:
path = _cmd_quote(path)
cmd_path = _cmd_quote(path)
ret = _run(path + ' ' + str(args) if args else path,
ret = _run(cmd_path + ' ' + str(args) if args else cmd_path,
cwd=cwd,
stdin=stdin,
output_loglevel=output_loglevel,