Homebrew / homebrew-cask

🍻 A CLI workflow for the administration of macOS applications distributed as binaries
https://brew.sh
BSD 2-Clause "Simplified" License
20.93k stars 10.71k forks source link

brew upgrade --cask docker favors formula over cask despite the flag #90236

Closed kojiromike closed 4 years ago

kojiromike commented 4 years ago

General troubleshooting steps

Description of issue

brew upgrade --cask docker gives this warning:

Warning: Treating docker as a formula. For the cask, use homebrew/cask/docker

But I think the --cask flag makes it unambiguous that the user wants a cask. In most other cases, brew upgrade --cask does the right thing.

Command that failed

$ brew upgrade --cask docker
Warning: Treating docker as a formula. For the cask, use homebrew/cask/docker

Output of command with --force --verbose --debug

$ brew upgrade --cask --force --verbose --debug docker
/usr/local/Homebrew/Library/Homebrew/brew.rb (Formulary::FormulaLoader): loading /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/docker.rb
Warning: Treating docker as a formula. For the cask, use homebrew/cask/docker

Output of brew doctor --verbose

$ brew doctor --verbose
==> Cask Environment Variables:
BUNDLE_PATH
CHRUBY_VERSION
GEM_HOME
GEM_PATH
HOMEBREW_CASK_OPTS
LC_ALL
PATH
RBENV_VERSION
RUBYLIB
RUBYOPT
RUBYPATH
SHELL
==> $LOAD_PATHS
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/ruby-macho-2.2.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/rubocop-rspec-1.43.2/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/rubocop-performance-1.8.1/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/ruby-progressbar-1.10.1/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/plist-3.5.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/patchelf-1.3.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/mechanize-2.7.6/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/elftools-1.1.3/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/bindata-2.4.8/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/activesupport-6.0.3.3/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/zeitwerk-2.4.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/tzinfo-1.2.7/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/thread_safe-0.3.6/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/i18n-1.8.5/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/concurrent-ruby-1.1.7/lib/concurrent-ruby
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.6.3_2/lib/ruby/2.6.0
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.6.3_2/lib/ruby/2.6.0/x86_64-darwin14
/usr/local/Homebrew/Library/Homebrew
==> Homebrew Version
2.5.2-71-g7a3f276
==> macOS
10.15.7
==> SIP
Enabled
==> Java
1.8.0_265
==> Homebrew Cask Staging Location
/usr/local/Caskroom
==> Homebrew Cask Taps:
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask (3672 casks)
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask-versions (160 casks)
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask-fonts (1565 casks)
/usr/local/Homebrew/Library/Taps/adoptopenjdk/homebrew-openjdk (43 casks)
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!

Warning: "config" scripts exist outside your system or Homebrew directories.
`./configure` scripts often look for *-config scripts to determine if
software packages are installed, and which additional flags to use when
compiling and linking.

Having additional scripts in your path can confuse software installed via
Homebrew if the config script overrides a system or Homebrew-provided
script of the same name. We found the following "config" scripts:
  /Users/michael/.pyenv/shims/python3.5m-config
  /Users/michael/.pyenv/shims/python3.6m-config
  /Users/michael/.pyenv/shims/python3.7-config
  /Users/michael/.pyenv/shims/python3.7m-config
  /Users/michael/.pyenv/shims/python3.5-config
  /Users/michael/.pyenv/shims/python-config
  /Users/michael/.pyenv/shims/python3-config
  /Users/michael/.pyenv/shims/python3.6-config
  /Users/michael/.pyenv/shims/python3.8-config

Output of brew tap

$ brew tap
adoptopenjdk/openjdk
homebrew/cask
homebrew/cask-fonts
homebrew/cask-versions
homebrew/core
NicoHaase commented 4 years ago

Similar problem here. brew cask outdated --greedy shows that an update for Docker is available, but there is no way to install it :(

miccal commented 4 years ago

brew upgrade does not accept the --casks flag (check brew upgrade --help), so please follow the suggestion to use the fully-qualified token which includes the Tap, and run:

brew upgrade homebrew/cask/docker

to upgrade.

kojiromike commented 4 years ago

brew upgrade does not accept the --casks flag

To be sure, it's --cask I'm talking about, not --casks. But just in case, I have opened #90367 because brew cask upgrade clearly recommends using brew upgrade --cask, so if that is an invalid command it should not be recommended.

miccal commented 4 years ago

Actually, I was mistaken -- although brew upgrade --help does not list the --cask/--casks flag, man brew does state that the --cask/--casks flag is valid.

Apologies for that.

miccal commented 4 years ago

Related discussion: https://github.com/Homebrew/discussions/discussions/14

kojiromike commented 4 years ago

awesome, thanks, all!