Skip to content

Conversation

issyl0
Copy link
Member

@issyl0 issyl0 commented Jul 1, 2025

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes? Here's an example.
  • Have you successfully run brew style with your changes locally?
  • Have you successfully run brew typecheck with your changes locally?
  • Have you successfully run brew tests with your changes locally?

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

- 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
```
@issyl0 issyl0 enabled auto-merge July 3, 2025 10:30
@issyl0 issyl0 added this pull request to the merge queue Jul 3, 2025
Merged via the queue into main with commit 4b85b24 Jul 3, 2025
33 checks passed
@issyl0 issyl0 deleted the fix-dry-run-install branch July 3, 2025 11:15
@MikeMcQuaid
Copy link
Member

Thanks @issyl0!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

brew install -n $PKG raises NoMethodError on #name
3 participants