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

Auto disable hints if already exists the environment variable #16947

Closed
1 task done
kallookoo opened this issue Mar 25, 2024 · 8 comments
Closed
1 task done

Auto disable hints if already exists the environment variable #16947

kallookoo opened this issue Mar 25, 2024 · 8 comments
Labels
features New features help wanted We want help addressing this outdated PR was locked due to age

Comments

@kallookoo
Copy link

Verification

Provide a detailed description of the proposed feature

The idea is not to show the hint when there is any of the variables related to it.

For example, if HOMEBREW_AUTO_UPDATE_SECS or HOMEBREW_NO_AUTO_UPDATE is defined, it is understood that it is already configured and it does not make sense to show it.

What is the motivation for the feature?

Keeping the console clean.

How will the feature be relevant to at least 90% of Homebrew users?

By not having extra or unnecessary information, the command information can be seen more clearly.

What alternatives to the feature have been considered?

You could add a check of the variables before displaying it.

@kallookoo kallookoo added the features New features label Mar 25, 2024
@kallookoo kallookoo changed the title Auto disable hints if already existe en environment variable Auto disable hints if already exists the environment variable Mar 25, 2024
@carlocab carlocab added the help wanted We want help addressing this label Mar 25, 2024
@MikeMcQuaid
Copy link
Member

Can you provide an example of the specific hints you're seeing that you don't want to?

@kallookoo
Copy link
Author

Hi @MikeMcQuaid

Sorry, but after checking it I have seen that in the brew.env file I misspelled the variable and after correcting it it is already hidden.

@skagedal
Copy link

skagedal commented Mar 29, 2024

I have HOMEBREW_AUTO_UPDATE_SECS set explicitly to 86400 (in my ~/.zshrc).

❯ echo $HOMEBREW_AUTO_UPDATE_SECS
86400

I was hoping that this would hide the specific hint about auto updates, while still providing me with other env hints that I might find useful. However, I still get the hint: (EDIT: nope, user error, see below)

==> Auto-updating Homebrew...
Adjust how often this is run with HOMEBREW_AUTO_UPDATE_SECS or disable with
HOMEBREW_NO_AUTO_UPDATE. Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).

I also got this hint:

==> Running `brew cleanup coreutils`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).

In this case, there seems to be no explicit configuration to set get the install cleanups, but that could be used to silence the hints.

❯ brew --version       
Homebrew 4.2.15

@skagedal
Copy link

Hmm, but I do see now here that the HOMEBREW_AUTO_UPDATE_SECS hint should be hidden if explicitly set... so this might be an user error on my side as well, not sure how but looking at it :)

@skagedal
Copy link

skagedal commented Mar 29, 2024

Oh yes, the env var was not exported 🤦 – sorry about that. But how about the HOMEBREW_NO_INSTALL_CLEANUP case?

If I read the code right, there is no way to silence just this warning without disabling the behavior. So that would be a feature request.

@MikeMcQuaid
Copy link
Member

If I read the code right, there is no way to silence just this warning without disabling the behavior. So that would be a feature request.

There is: set HOMEBREW_NO_ENV_HINTS, as the message says.

Passing on this, sorry.

@MikeMcQuaid MikeMcQuaid closed this as not planned Won't fix, can't repro, duplicate, stale Mar 29, 2024
@skagedal
Copy link

No, that also disables other hints? But I of course realize that this is a rather specific ask and I perfectly understand that you would pass on it. :)

@MikeMcQuaid
Copy link
Member

No, that also disables other hints?

Yes. We don't have hint-by-hint disabling, sorry.

@github-actions github-actions bot added the outdated PR was locked due to age label Apr 29, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
features New features help wanted We want help addressing this outdated PR was locked due to age
Projects
None yet
Development

No branches or pull requests

4 participants