urbanadventurer/WhatWeb

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

bcoles opened this issue · 0 comments

#
# 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