Homebrew / brew

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

caskroom of removed formula makes `Hbc.installed` fail #2503

Closed Nondv closed 7 years ago

Nondv commented 7 years ago

Hi everyone! I tried to run brew cask list but got this:

$ brew cask list
Error: No available Cask for mypaint

# the same goes for `outdated`
$ brew cask outdated
Error: No available Cask for mypaint

I did some investigation and discovered that I have this:

/usr/local/Caskroom $ find mypaint
mypaint
mypaint/1.0.0v3
mypaint/1.0.0v3/MyPaint-1.0.0v3.pkg

and this formula is not presented in cask anymore.

If I rm this everything'll be gonna be ok. I suggest to ignore CaskUnavailableError when listing installed casks. https://github.com/Homebrew/brew/pull/2504

brew cask doctor:

==> Homebrew-Cask Version
Homebrew-Cask 1.1.13
caskroom/homebrew-cask (git revision f15ba; last commit 2017-04-18)
==> 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 (3630 casks)
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core (0 casks)
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-dupes (0 casks)
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-services (0 casks)
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-versions (0 casks)
==> Contents of $LOAD_PATH
/usr/local/Homebrew/Library/Homebrew/cask/lib
/usr/local/Homebrew/Library/Homebrew
/Library/Ruby/Gems/2.0.0/gems/json-1.8.3/lib
/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
LANG="en_US.UTF-8"
LC_TIME="en_GB.UTF-8"
PATH="~/.rvm/gems/ruby-2.3.0/bin:~/.rvm/gems/ruby-2.3.0@global/bin:~/.rvm/rubies/ruby-2.3.0/bin:~/projects/golang/bin:/usr/local/opt/go/libexec/bin:~/bin:/usr/local/bin:~/scala/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/git/bin:/Library/TeX/texbin:~/projects/golang/bin:/usr/local/opt/go/libexec/bin:~/bin:~/scala/bin:~/.rvm/bin:/usr/local/Homebrew/Library/Taps/homebrew/homebrew-services/cmd:/usr/local/Homebrew/Library/Homebrew/shims/scm"
SHELL="/bin/bash"
MikeMcQuaid commented 7 years ago

Please note we may immediately close your issue without comment if you do not fill out the issue template and provide the requested information.