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

brew cask update is deprecated but brew update doesn't work #35734

Closed
5 tasks done
revolter opened this issue Jun 21, 2017 · 9 comments
Closed
5 tasks done

brew cask update is deprecated but brew update doesn't work #35734

revolter opened this issue Jun 21, 2017 · 9 comments

Comments

@revolter
Copy link
Contributor

General troubleshooting steps

Description of issue

Running brew cask update studio-3t prints this warning message:

Warning: Calling brew cask update is deprecated and will be disabled on 2017-07-01!
Use brew update instead.
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli.rb:98:in `run_command'

Running brew update doesn't update studio-3t though.

Output of your command with --verbose --debug

Warning: Calling `brew cask update` is deprecated and will be disabled on 2017-07-01!
Use `brew update` instead.
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli.rb:98:in `run_command'

==> Executing: ["/usr/local/bin/brew", "update"]
==> Already up-to-date.
/usr/local/Homebrew/Library/Homebrew/compat/hbc/cli/update.rb:11:in `exit'
/usr/local/Homebrew/Library/Homebrew/compat/hbc/cli/update.rb:11:in `run'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli.rb:98:in `run_command'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli.rb:168:in `run'
/usr/local/Homebrew/Library/Homebrew/cask/lib/hbc/cli.rb:132:in `run'
/usr/local/Homebrew/Library/Homebrew/cmd/cask.rb:8:in `cask'
/usr/local/Homebrew/Library/Homebrew/brew.rb:101:in `<main>'

Output of brew cask doctor

==> Homebrew-Cask Version
Homebrew-Cask 1.2.3
caskroom/homebrew-cask (git revision 7692f; last commit 2017-06-21)
==> Homebrew-Cask Install Location
<NONE>
==> Homebrew-Cask Staging Location
/usr/local/Caskroom
==> Homebrew-Cask Cached Downloads
~/Library/Caches/Homebrew/Cask
==> Homebrew-Cask Taps:
/usr/local/Homebrew/Library/Taps/caskroom/homebrew-cask (3639 casks)
==> Contents of $LOAD_PATH
/usr/local/Homebrew/Library/Homebrew/cask/lib
/usr/local/Homebrew/Library/Homebrew
/Library/Ruby/Site/2.0.0
/Library/Ruby/Site/2.0.0/x86_64-darwin16
/Library/Ruby/Site/2.0.0/universal-darwin16
/Library/Ruby/Site
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/vendor_ruby/2.0.0
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/vendor_ruby/2.0.0/x86_64-darwin16
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/vendor_ruby/2.0.0/universal-darwin16
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/vendor_ruby
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/x86_64-darwin16
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/universal-darwin16
==> Environment Variables
LC_ALL="en_US.UTF-8"
LC_CTYPE="UTF-8"
PATH="/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/opt/local/bin:/opt/local/sbin:/usr/local/sbin:~/.local:~/.local/bin:~/Library/Python/2.7/bin:/usr/local/opt/qt/bin:~/.local/git-scripts:~/.gems/bin:/usr/local/Homebrew/Library/Taps/homebrew/homebrew-command-not-found/cmd:/usr/local/Homebrew/Library/Homebrew/shims/scm"
SHELL="/bin/zsh"
@commitay
Copy link
Contributor

commitay commented Jun 21, 2017

Running brew update doesn't update studio-3t though.

$ brew update

$ brew cask reinstall studio-3t

Running brew update will update Homebrew and Homebrew-Cask not the casks that you have installed.


brew cask upgrade will install new versions of casks once it is implemented.

@revolter
Copy link
Contributor Author

  1. Why isn't brew cask update studio-3t calling brew cask reinstall studio-3t behind the scenes? As the semantics of the first command are much better than of the second one.
  2. brew update updated the packages installed by Homebrew, not only Homebrew itself, so, logically, I thought brew cask update would update the casks installed by Homebrew Cask.
  3. Why isn't brew cask reinstall mentioned in the brew cask update's warning message?

@commitay
Copy link
Contributor

Why isn't brew cask update studio-3t calling brew cask reinstall studio-3t

brew cask update used to only update Homebrew-Cask before it merged with Homebrew

brew update updated the packages installed by Homebrew, not only Homebrew itself

No, it doesn't. brew update will update Homebrew, brew upgrade will install new versions of formula.

Why isn't brew cask reinstall mentioned in the brew cask update's warning message?

Because running brew cask update has never installed new versions of casks.

@revolter
Copy link
Contributor Author

Oh, right, then, why isn't brew cask update && brew cask upgrade updating the installed casks?

@commitay
Copy link
Contributor

As it said in the error message:

Warning: Calling `brew cask update` is deprecated and will be disabled on 2017-07-01!
Use `brew update` instead.

brew cask upgrade doesn't do anything currently, it is being implemented.

@vitorgalvao
Copy link
Member

brew cask update used to only update Homebrew-Cask before it merged with Homebrew

Small correction there. brew cask update was always nothing more than an alias to brew update, meaning it updated everything1. Part of the reason brew cask update was deprecated was that I kept seeing people do brew update && brew cask update, essentially running the same command twice. Clearly is wasn’t obvious that both commands did the same and the cask version only existed for convenience, so we decided to scrape it.

Everything else is spot on!


1: Not really everything. When homebrew-cask was itself a formula, brew update updated the casks but the core itself needed to be updated with brew upgrade brew-cask
or brew upgrade. This led to a situation where you might have casks that included features that the core didn’t understand (because you ran update but not upgrade). Casks even had different version specifications at that time due to that. Glad that time has passed.

@revolter
Copy link
Contributor Author

Ok, understood. I would still add something along the lines of:

If you're trying to update a cask, run brew update && brew cask reinstall <cask-name> instead.

to that warning message.

@commitay
Copy link
Contributor

Small correction there. brew cask update was always nothing more than an alias to brew update

Oops, thank you for the correction. 👍

I kept seeing people do brew update && brew cask update

Me (for a few months) 😆

@vitorgalvao
Copy link
Member

vitorgalvao commented Jun 21, 2017

Ok, understood. I would still add something along the lines of:

If you're trying to update a cask, run brew update && brew cask reinstall <cask-name> instead.

to that warning message.

To put it bluntly, everyone who misunderstands a message thinks we should add a correction to it according to their confusion. If we did so, every warning and notification would include the full length of our documentation. This is not a common confusion, so it does not need further clarification.

We make additions to messages when multiple people make a mistake (case in point, the aforementioned brew cask upgrade duplication). Otherwise we may still make messages clearer, but we’re not going to explain every use case in normal usage. That’s what man pages and online documentation are for.

Either way, seems like the issue is solved. So closing.

@lock lock bot locked as resolved and limited conversation to collaborators May 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants