Skip to content

brew install -n $PKG raises NoMethodError on #name #20199

@zenspider

Description

@zenspider

brew doctor output

I'm currently tier 2 because I haven't updated xcode, but this is not related

Verification

  • I ran brew update twice and am still able to reproduce my issue.
  • My "brew doctor output" above says Your system is ready to brew or a definitely unrelated Tier message.
  • This issue's title and/or description do not reference a single formula e.g. brew install wget. If they do, open an issue at https://github.com/Homebrew/homebrew-core/issues/new/choose instead.

brew config output

HOMEBREW_VERSION: 4.5.8-117-g019a799
ORIGIN: https://github.com/Homebrew/brew
HEAD: 019a799fae067b539390c2e594e8536bb8f6ec8b
Last commit: 23 hours ago
Branch: master
Core tap HEAD: 8d88a443b6822781e1ffe9d9a4839642fb9e5bc5
Core tap last commit: 42 minutes ago
Core tap JSON: 30 Jun 22:12 UTC
Core cask tap HEAD: 88ef2fb90b4b8190094fb74c9dba0799b46bac8e
Core cask tap last commit: 19 minutes ago
Core cask tap JSON: 30 Jun 22:12 UTC
HOMEBREW_PREFIX: /opt/homebrew
HOMEBREW_CASK_OPTS: ["--appdir=~/Applications"]
HOMEBREW_EDITOR: emacsclient -t
HOMEBREW_MAKE_JOBS: 10
HOMEBREW_NO_ANALYTICS: set
HOMEBREW_NO_AUTOREMOVE: set
HOMEBREW_NO_AUTO_UPDATE: set
HOMEBREW_NO_COLOR: set
HOMEBREW_NO_EMOJI: set
HOMEBREW_NO_GITHUB_API: set
HOMEBREW_NO_INSECURE_REDIRECT: set
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: set
HOMEBREW_NO_INSTALL_CLEANUP: set
HOMEBREW_NO_INSTALL_UPGRADE: set
HOMEBREW_SORBET_RUNTIME: set
Homebrew Ruby: 3.4.4 => /opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.4.4/bin/ruby
CPU: deca-core 64-bit arm_donan
Clang: 16.0.0 build 1600
Git: 2.50.0 => /opt/homebrew/bin/git
Curl: 8.7.1 => /usr/bin/curl
macOS: 15.5-arm64
CLT: 26.0
Xcode: N/A
Rosetta 2: false

What were you trying to do (and why)?

see the steps involved for an install, using -n flag.

What happened (include all command output)?

10007 $ brew install -n lua
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'
/opt/homebrew/Library/Homebrew/cmd/install.rb:359:in 'Homebrew::Cmd::InstallCmd#run'
/opt/homebrew/Library/Homebrew/brew.rb:95:in '<main>'
Please report this issue:
  https://docs.brew.sh/Troubleshooting

this happens with any uninstalled package I've tried so far

/opt/homebrew/Library/Homebrew/install.rb:330 probably needs to be changed to:

          if (formulae_name_to_install = formula_installers.map(&:formula).map(&:name))

this seems to work

What did you expect to happen?

no errors

Step-by-step reproduction instructions (by running brew commands)

brew install -n lua

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions