repair style

This commit is contained in:
hyuraku 2022-08-18 00:16:11 +09:00
parent 66817c0c32
commit 1bfcf314ac
2 changed files with 8 additions and 5 deletions

View File

@ -77,7 +77,8 @@ module Cask
if dry_run
casks_to_install = casks.reject(&:installed?)
if casks_to_install.present?
ohai "Would install #{casks_to_install.count} #{"package".pluralize(casks_to_install.count)}:"
plural = "package".pluralize(casks_to_install.count)
ohai "Would install #{casks_to_install.count} #{plural}:"
puts casks_to_install.map(&:full_name).join(" ")
end
end
@ -92,7 +93,8 @@ module Cask
.map(&:to_formula)
.map(&:name)
if dep_names.present?
ohai "Would install #{dep_names.count} #{"dependency".pluralize(dep_names.count)} for #{cask.full_name}:"
plural = "dependency".pluralize(dep_names.count)
ohai "Would install #{dep_names.count} #{plural} for #{cask.full_name}:"
puts dep_names.join(" ")
end
next

View File

@ -322,7 +322,8 @@ module Homebrew
if dry_run
formulae_name_to_install = formulae_to_install.map(&:name)
if formulae_name_to_install.present?
ohai "Would install #{formulae_name_to_install.count} #{"package".pluralize(formulae_name_to_install.count)}:"
plural = "package".pluralize(casks_to_install.count)
ohai "Would install #{formulae_name_to_install.count} #{plural}:"
puts formulae_name_to_install.join(" ")
end
end
@ -348,7 +349,7 @@ module Homebrew
private_class_method :install_formula
def print_dry_run_dependencies(formula, dependencies)
return unless dependencies.present?
return if dependencies.empry?
plural = "dependency".pluralize(dependencies.count)
ohai "Would install #{dependencies.count} #{plural} for #{formula.name}:"