Homebrew / brew

🍺 The missing package manager for macOS (or Linux)
https://brew.sh
BSD 2-Clause "Simplified" License
41.33k stars 9.72k forks source link

brew deps --installed includes Casks #9361

Closed ErikMinekus closed 3 years ago

ErikMinekus commented 3 years ago

Bug report

Please note we will close your issue without comment if you delete, do not read or do not fill out the issue checklist below and provide ALL the requested information. If you repeatedly fail to use the issue template, we will block you from ever submitting issues to Homebrew again.

What you were trying to do (and why)

Get a list of formulae and their dependencies.

What happened (include command output)

brew deps --installed returned both formulae and Casks. I couldn't find any flag to filter out Casks.

Command output
$ brew deps --installed
ableton-live-intro9:
alfred:
ansible: gdbm libyaml openssl@1.1 python@3.9 readline sqlite xz
bash-completion:
beatport-pro:
bettertouchtool:
blackhole:
brave-browser:
carthage:
vitorgalvao/tiny-scripts/cask-repair: hr hub
cocoapods: libffi libyaml openssl@1.1 readline ruby
coconutbattery:
composer:
deno:
docker:
docker:
docker-completion:
docker-compose-completion:
engine-prime:
freetype: libpng
gcc: gmp isl libmpc mpfr
gdbm:
gettext:
git: gettext pcre2
gmp:
go:
google-chrome:
heroku/brew/heroku: heroku/brew/heroku-node
heroku/brew/heroku-node:
hr:
httpie: gdbm openssl@1.1 python@3.9 readline sqlite xz
hub:
icu4c:
iina:
isl: gmp
iterm2:
keka:
keyfinder:
krb5: openssl@1.1
libffi:
libidn2: gettext libunistring
libmpc: gmp mpfr
libpng:
libssh2: openssl@1.1
libunistring:
libyaml:
llvm: libffi
mono-mdk-for-visual-studio:
mp3val:
mpfr: gmp
native-access:
ninja: gdbm openssl@1.1 python@3.9 readline sqlite xz
node: icu4c
obs:
openssl@1.1:
p7zip:
pcre2:
php-cs-fixer:
phpstorm:
pkg-config:
postman:
puush:
python@3.9: gdbm openssl@1.1 readline sqlite xz
qlstephen:
qlvideo:
qt:
raspberry-pi-imager:
readline:
rekordbox:
rename:
ruby: libyaml openssl@1.1 readline
rust: libssh2 openssl@1.1 pkg-config
sequel-pro:
sourcetree:
spectacle:
sphinx-doc: gdbm openssl@1.1 python@3.9 readline sqlite xz
sqlite: readline
ssdeep:
steam:
sublime-text:
the-tagger:
travis: libffi libyaml openssl@1.1 readline ruby
vagrant:
virtualbox:
virtualbox-extension-pack:
visual-studio-code:
wacom-tablet:
wget: gettext libidn2 libunistring openssl@1.1
xld:
xz:
yarn: icu4c node
  

What you expected to happen

brew deps --help seems to suggest that it only works with formulae. I also don't think it's possible for Casks to have dependencies. If that's the case, it should not return Casks. If that's not the case, there should be a flag to filter out Casks.

Step-by-step reproduction instructions (by running brew commands)

brew deps --installed

Output of brew config and brew doctor commands

$ brew config
HOMEBREW_VERSION: 2.5.12-369-gc003070
ORIGIN: https://github.com/Homebrew/brew
HEAD: c00307024ffe7b6de9f87305830f0c867e1e8a19
Last commit: 43 minutes ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 332cd9f5cb02a89c9df3f9ff4392cf8575b899dc
Core tap last commit: 2 hours ago
Core tap branch: master
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CASK_OPTS: []
HOMEBREW_MAKE_JOBS: 8
Homebrew Ruby: 2.6.3 => /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.6.3_2/bin/ruby
CPU: octa-core 64-bit skylake
Clang: 11.0 build 1100
Git: 2.29.2 => /usr/local/bin/git
Curl: 7.54.0 => /usr/bin/curl
macOS: 10.14.6-x86_64
CLT: 10.3.0.0.1.1562985497
Xcode: 11.3.1

$ brew doctor
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: A newer Command Line Tools release is available.
Update them from Software Update in System Preferences or run:
  softwareupdate --all --install --force

If that doesn't show you an update run:
  sudo rm -rf /Library/Developer/CommandLineTools
  sudo xcode-select --install

Alternatively, manually download them from:
  https://developer.apple.com/download/more/.

Warning: The following directories do not exist:
/usr/local/sbin

You should create these directories and change their ownership to your account.
  sudo mkdir -p /usr/local/sbin
  sudo chown -R $(whoami) /usr/local/sbin
MikeMcQuaid commented 3 years ago

This is intentional behaviour. We'll review a PR to add --cask and --formula flags to the brew deps command.