From 1e08d31e14f78487f4529fffae36d279696fd730 Mon Sep 17 00:00:00 2001 From: Max Howell Date: Fri, 31 Jul 2009 03:56:46 +0100 Subject: opoo function for warning messages --- Library/Homebrew/formula.rb | 2 +- Library/Homebrew/utils.rb | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'Library') diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index f2763f899..8fb0bcb60 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -130,7 +130,7 @@ class AbstractFormula if @md5 and not @md5.empty? raise "MD5 mismatch: #{md5}" unless md5 == @md5.downcase else - ohai "Warning: Formula does not provide an MD5 hash." + opoo "Formula does not provide an MD5 hash." end # we make an additional subdirectory so know exactly what we are diff --git a/Library/Homebrew/utils.rb b/Library/Homebrew/utils.rb index 87ffb1473..112c6b6b6 100644 --- a/Library/Homebrew/utils.rb +++ b/Library/Homebrew/utils.rb @@ -19,3 +19,8 @@ def ohai title n=`tput cols`.strip.to_i-4 puts "\033[0;34m==>\033[0;0;1m #{title[0,n]}\033[0;0m" end + +# shows a warning in delicious pink +def opoo warning + puts "WARNING \033[1;35m#{warning}\033[0;0m" +end -- cgit v1.2.3