inreplace: odie for Homebrew developers.
This commit is contained in:
parent
81bf8a168a
commit
be3e60fc95
@ -12,8 +12,11 @@ module Utils
|
|||||||
after = after.to_s if Symbol === after
|
after = after.to_s if Symbol === after
|
||||||
sub = s.gsub!(before, after)
|
sub = s.gsub!(before, after)
|
||||||
if sub.nil?
|
if sub.nil?
|
||||||
opoo "inreplace in '#{path}' failed"
|
message = <<-EOS.undent
|
||||||
puts "Expected replacement of '#{before}' with '#{after}'"
|
inreplace in '#{path}' failed
|
||||||
|
Expected replacement of '#{before}' with '#{after}'
|
||||||
|
EOS
|
||||||
|
ARGV.homebrew_developer? ? odie(message) : opoo(message)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user