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

--no-brew-update overrides --all #238

Open
wickles opened this issue Sep 12, 2023 · 5 comments
Open

--no-brew-update overrides --all #238

wickles opened this issue Sep 12, 2023 · 5 comments

Comments

@wickles
Copy link

wickles commented Sep 12, 2023

❯ brew cu --report-only --quiet --all
==> Updating Homebrew
Already up-to-date.
==> Finding outdated apps
==> Found outdated apps
       Cask                Current           Latest            A/U    Result    
...
 6/15  firefox             108.0             117.0.1            Y   [ FORCED ]  
 7/15  obsidian            1.4.11            1.4.12             Y   [ FORCED ]  
 8/15  onedrive            22.141.0703.0002  23.153.0724.0003   Y   [ FORCED ]  
 9/15  ppsspp              1.16              1.16.1                 [OUTDATED]  
10/15  spotify             1.2.10.760        1.2.19.941         Y   [ FORCED ]  
...
❯ brew cu --report-only --quiet --all --no-brew-update
==> Finding outdated apps
==> Found outdated apps
     Cask    Current  Latest  A/U    Result    
1/1  ppsspp  1.16     1.16.1       [OUTDATED]  

Not sure how this is happening. Only difference is:

puts Cask.brew_update(options.verbose).stdout

@wickles
Copy link
Author

wickles commented Sep 12, 2023

Personally I would prefer brew cu to inherit from environment variables HOMEBREW_NO_AUTO_UPDATE and HOMEBREW_AUTO_UPDATE_SECS as documented in man brew.

@ondrejfuhrer
Copy link
Collaborator

That's interesting. However I can't seem to be able to reproduce that.

❯ brew cu --report-only --quiet --all
==> Updating Homebrew
Already up-to-date.
==> Finding outdated apps
==> Found outdated apps
     Cask        Current  Latest   A/U    Result
1/5  discord     0.0.277  0.0.278   Y   [ FORCED ]
2/5  duckduckgo  1.55.0   1.57.0    Y   [ FORCED ]
3/5  github      3.3.1    3.3.2     Y   [ FORCED ]
4/5  tutanota    3.118.7  3.118.8   Y   [ FORCED ]
5/5  visualvm    2.1.6    2.1.7         [OUTDATED]

Comparing to

brew cu --report-only --quiet --all --no-brew-update
==> Finding outdated apps
==> Found outdated apps
     Cask        Current  Latest   A/U    Result
1/5  discord     0.0.277  0.0.278   Y   [ FORCED ]
2/5  duckduckgo  1.55.0   1.57.0    Y   [ FORCED ]
3/5  github      3.3.1    3.3.2     Y   [ FORCED ]
4/5  tutanota    3.118.7  3.118.8   Y   [ FORCED ]
5/5  visualvm    2.1.6    2.1.7         [OUTDATED]

I wonder what's going on.

@ondrejfuhrer
Copy link
Collaborator

Personally I would prefer brew cu to inherit from environment variables HOMEBREW_NO_AUTO_UPDATE and HOMEBREW_AUTO_UPDATE_SECS as documented in man brew.

I agree, that's a valid feature request. Maybe we could separate that to a separate issue and let the community build that 🙂 The --no-brew-update was built before those options were present so it's just a historical reason why this is not yet respecting it.

@wickles
Copy link
Author

wickles commented Sep 21, 2023

However I can't seem to be able to reproduce that.

Appears to be related to another configuration flag I use. Try setting environment variable HOMEBREW_NO_INSTALL_FROM_API=1. When I unset that they produce the same output. However we should prefer to get the same output either way.

@ondrejfuhrer
Copy link
Collaborator

ondrejfuhrer commented Dec 31, 2023

However I can't seem to be able to reproduce that.

Appears to be related to another configuration flag I use. Try setting environment variable HOMEBREW_NO_INSTALL_FROM_API=1. When I unset that they produce the same output. However we should prefer to get the same output either way.

We don't actually do anything with this flag and it seems that it's actually a development command so therefore not really to be used by "general public". The issue is that when the flag is set, then Cask::version doesn't report installed version for most of the casks and therefore we don't know that they are outdated. I'm not sure if it's worth trying to support and try to find a different way for getting current version then this official API.

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

No branches or pull requests

2 participants