Skip to content
New issue

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

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

Already on GitHub? # to your account

fix no autoremove suggestion typo #17266

Merged
merged 1 commit into from
May 10, 2024
Merged

Conversation

apainintheneck
Copy link
Contributor

  • 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?

This currently suggests setting an environment variable that is different than the one we end up checking so I've updated the warning so now things match. If the goal was to have the name in the warning, the environment variable checking logic could be updated. I have no personal preference.

$ brew irb
==> Interactive Homebrew Shell
Example commands available with: `brew irb --examples`
brew(main):001:0> ENV["HOMEBREW_NO_AUTO_REMOVE"] = "1"
=> "1"
brew(main):002:0> Homebrew::EnvConfig.no_autoremove?
=> false
brew(main):003:0> ENV["HOMEBREW_NO_AUTOREMOVE"] = "1"
=> "1"
brew(main):004:0> Homebrew::EnvConfig.no_autoremove?
=> true

This suggests setting an environment variable that is different
than the one we end up checking so I've updated the warning so
now things match. If the goal was to have the name in the warning,
the environment variable checking logic could be updated. I have
no personal preference.

```console
$ brew irb
==> Interactive Homebrew Shell
Example commands available with: `brew irb --examples`
brew(main):001:0> ENV["HOMEBREW_NO_AUTO_REMOVE"] = "1"
=> "1"
brew(main):002:0> Homebrew::EnvConfig.no_autoremove?
=> false
brew(main):003:0> ENV["HOMEBREW_NO_AUTOREMOVE"] = "1"
=> "1"
brew(main):004:0> Homebrew::EnvConfig.no_autoremove?
=> true
```
Copy link
Member

@ZhongRuoyu ZhongRuoyu left a comment

Choose a reason for hiding this comment

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

Thanks for catching this!

@ZhongRuoyu ZhongRuoyu enabled auto-merge May 10, 2024 03:21
@ZhongRuoyu ZhongRuoyu merged commit 1c28136 into master May 10, 2024
25 checks passed
@ZhongRuoyu ZhongRuoyu deleted the fix-no-autoremove-suggestion branch May 10, 2024 03:27
@MikeMcQuaid
Copy link
Member

@apainintheneck Doh, thanks for catching this! ❤️

@github-actions github-actions bot added the outdated PR was locked due to age label Jun 10, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 10, 2024
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
outdated PR was locked due to age
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants