When running osquery commands through cmd.run we should pass python_shell=True to ensure everything is formatted right. #42873

This commit is contained in:
Gareth J. Greenaway 2017-08-14 20:47:43 -07:00
parent a537197030
commit 5ac41f496d

View file

@ -56,7 +56,7 @@ def _osquery(sql, format='json'):
}
cmd = 'osqueryi --json "{0}"'.format(sql)
res = __salt__['cmd.run_all'](cmd)
res = __salt__['cmd.run_all'](cmd, python_shell=True)
if res['retcode'] == 0:
ret['data'] = json.loads(res['stdout'])
else: