Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only brew desc --search needs --eval-all #17102

Merged
merged 1 commit into from Apr 18, 2024

Conversation

issyl0
Copy link
Member

@issyl0 issyl0 commented Apr 17, 2024

  • 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 desc hello
Error: `brew desc` needs `--eval-all` passed or `HOMEBREW_EVAL_ALL` set!

After:

$ brew desc hello
hello: Program providing model for GNU coding standards and practices

$ brew desc --search hello
Error: Invalid usage: `brew desc --search` needs `--eval-all` passed or `HOMEBREW_EVAL_ALL` set!

$ brew desc --search --eval-all hello
==> Formulae
dsh: Dancer's shell, or distributed shell
hello: Program providing model for GNU coding standards and practices

- It was suggested in https://github.com/Homebrew/brew/issues/ 16733 that
  `brew desc <formula_or_cask>` should work like `brew info <formula_or_cask>`
  and print the description of the package without needing `--eval-all`.
- Looking at the code, it seems like it's only searching that needs
  `--eval-all`, so limit the check to that.

Before:

```shell
$ brew desc hello
Error: `brew desc` needs `--eval-all` passed or `HOMEBREW_EVAL_ALL` set!
```

After:

```shell
$ brew desc hello
hello: Program providing model for GNU coding standards and practices

$ brew desc --search hello
Error: Invalid usage: `brew desc --search` needs `--eval-all` passed or `HOMEBREW_EVAL_ALL` set!

$ brew desc --search --eval-all hello
==> Formulae
dsh: Dancer's shell, or distributed shell
hello: Program providing model for GNU coding standards and practices
```
Copy link
Member

@MikeMcQuaid MikeMcQuaid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work, thanks again @issyl0!

@MikeMcQuaid MikeMcQuaid merged commit 3c72da9 into master Apr 18, 2024
25 checks passed
@MikeMcQuaid MikeMcQuaid deleted the only-brew-desc-search-needs-eval-all branch April 18, 2024 09:30
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 desc <formula> should just work, and not require --eval-all
2 participants