bump-formula-pr: add --write option

intended to be used in combination with --dry-run for a not-so-dry run

the expected file modifications are made, but no git actions are taken
This commit is contained in:
ilovezfs 2016-09-04 11:25:00 -07:00
parent 394b0884eb
commit f4cfb9ee87

View File

@ -38,6 +38,7 @@ module Homebrew
unless contents.errors.empty? unless contents.errors.empty?
raise Utils::InreplaceError, path => contents.errors raise Utils::InreplaceError, path => contents.errors
end end
path.atomic_write(contents) if ARGV.include?("--write")
contents contents
else else
Utils::Inreplace.inreplace(path) do |s| Utils::Inreplace.inreplace(path) do |s|