lib/chef-irc-snitch.rb in chef-irc-snitch-0.2.0 vs lib/chef-irc-snitch.rb in chef-irc-snitch-0.2.1
- old
+ new
@@ -71,14 +71,11 @@
Chef::Log.error("Unexpected error while attempting to message chefs via IRC: #{error}")
end
end
def report
- @timestamp = Time.now.getutc
- if STDOUT.tty?
- Chef::Log.error("Chef run failed @ #{@timestamp}")
- Chef::Log.error(run_status.formatted_exception)
- else
+ unless STDOUT.tty?
+ @timestamp = Time.now.getutc
Chef::Log.error("Chef run failed @ #{@timestamp}, snitchin' to chefs via IRC")
create_gist
unless @gist_url.nil?
message_irc
end