def _call_brew(cmd, failhard=True):
 user = __salt__['file.get_user'](_homebrew_bin())
 runas = (user if (user != __opts__['user']) else None)
 result = __salt__['cmd.run_all'](cmd, runas=runas, output_loglevel='trace', python_shell=False)
 if (failhard and (result['retcode'] != 0)):
  raise CommandExecutionError('Brew command failed', info={'result': result})
 return result

def _call_brew ( cmd , failhard = True ) : user = __salt__ [ 'file.get_user' ] ( _homebrew_bin ( ) ) runas = ( user if ( user != __opts__ [ 'user' ] ) else None ) result = __salt__ [ 'cmd.run_all' ] ( cmd , runas = runas , output_loglevel = 'trace' , python_shell = False ) if ( failhard and ( result [ 'retcode' ] != 0 ) ) : raise CommandExecutionError ( 'Brew command failed' , info = { 'result' : result } ) return result
calls the brew command with the user account of brew .