mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
Fix "undefined method 'name' for an instance of FormulaInstaller"
- Because `name` is not a method on `FormulaInstaller`, instead `formula` shows the name. - Fixes issue 20199. Before: ``` $ brew install -n hello Error: undefined method 'name' for an instance of FormulaInstaller Warning: Removed Sorbet lines from backtrace! Rerun with `--verbose` to see the original backtrace /opt/homebrew/Library/Homebrew/install.rb:330:in 'Array#map' /opt/homebrew/Library/Homebrew/install.rb:330:in 'Homebrew::Install.install_formulae' ``` After: ``` $ brew install -n hello ==> Would install 1 formula: hello ```
This commit is contained in:
parent
8520539312
commit
5310c5e730
@ -327,7 +327,7 @@ module Homebrew
|
|||||||
end
|
end
|
||||||
|
|
||||||
if dry_run
|
if dry_run
|
||||||
if (formulae_name_to_install = formula_installers.map(&:name))
|
if (formulae_name_to_install = formula_installers.map(&:formula))
|
||||||
ohai "Would install #{Utils.pluralize("formula", formulae_name_to_install.count,
|
ohai "Would install #{Utils.pluralize("formula", formulae_name_to_install.count,
|
||||||
plural: "e", include_count: true)}:"
|
plural: "e", include_count: true)}:"
|
||||||
puts formulae_name_to_install.join(" ")
|
puts formulae_name_to_install.join(" ")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user