# File lib/facter/util/virtual.rb, line 16
  def self.virt_what(cmd = "virt-what")
    if bindir = Facter::Util::Config.override_binary_dir
      command = Facter::Core::Execution.which(File.join(bindir, cmd))
    else
      command = nil
    end

    if !command
      command = Facter::Core::Execution.which(cmd)
      return unless command
    end

    if Facter.value(:kernel) == 'windows'
      redirected_cmd = "#{command} 2>NUL"
    else
      redirected_cmd = "#{command} 2>/dev/null"
    end
    output = Facter::Core::Execution.exec redirected_cmd
    output.gsub(/^virt-what: .*$/, '') if output
  end