urbanadventurer / WhatWeb

Next generation web scanner
https://www.morningstarsecurity.com/research/whatweb
GNU General Public License v2.0
5.2k stars 885 forks source link

TODO: whatweb: make use_color smart, so it detects a tty #340

Open bcoles opened 3 years ago

bcoles commented 3 years ago
#
# Display error messages
#
def error(s)
  return if $NO_ERRORS
  $semaphore.reentrant_synchronize do
    # TODO: make use_color smart, so it detects a tty
    STDERR.puts((($use_colour == 'auto') || ($use_colour == 'always')) ? red(s) : s)
    STDERR.flush
    $LOG_ERRORS.out(s) if $LOG_ERRORS
  end
end