Merge pull request #8176 from Rylan12/update-report-fix-args

update-report: fix args
This commit is contained in:
Michka Popoff 2020-08-01 21:19:09 +02:00 committed by GitHub
commit 7348f3670a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -11,7 +11,7 @@ require "cli/parser"
module Homebrew module Homebrew
module_function module_function
def update_preinstall_header def update_preinstall_header(args:)
@update_preinstall_header ||= begin @update_preinstall_header ||= begin
ohai "Auto-updated Homebrew!" if args.preinstall? ohai "Auto-updated Homebrew!" if args.preinstall?
true true
@ -80,7 +80,7 @@ module Homebrew
odie "update-report should not be called directly!" if initial_revision.empty? || current_revision.empty? odie "update-report should not be called directly!" if initial_revision.empty? || current_revision.empty?
if initial_revision != current_revision if initial_revision != current_revision
update_preinstall_header update_preinstall_header args: args
puts "Updated Homebrew from #{shorten_revision(initial_revision)} to #{shorten_revision(current_revision)}." puts "Updated Homebrew from #{shorten_revision(initial_revision)} to #{shorten_revision(current_revision)}."
updated = true updated = true
end end
@ -107,7 +107,7 @@ module Homebrew
end end
unless updated_taps.empty? unless updated_taps.empty?
update_preinstall_header update_preinstall_header args: args
puts "Updated #{updated_taps.count} #{"tap".pluralize(updated_taps.count)} (#{updated_taps.to_sentence})." puts "Updated #{updated_taps.count} #{"tap".pluralize(updated_taps.count)} (#{updated_taps.to_sentence})."
updated = true updated = true
end end