inreplace: odie for Homebrew developers.

This commit is contained in:
Mike McQuaid 2013-11-12 15:42:46 +00:00
parent 81bf8a168a
commit be3e60fc95

View File

@ -12,8 +12,11 @@ module Utils
after = after.to_s if Symbol === after
sub = s.gsub!(before, after)
if sub.nil?
opoo "inreplace in '#{path}' failed"
puts "Expected replacement of '#{before}' with '#{after}'"
message = <<-EOS.undent
inreplace in '#{path}' failed
Expected replacement of '#{before}' with '#{after}'
EOS
ARGV.homebrew_developer? ? odie(message) : opoo(message)
end
end