buo / homebrew-cask-upgrade

A command line tool for upgrading every outdated app installed by Homebrew Cask
MIT License
2.4k stars 90 forks source link

uninitialized constant Cask::Cask::CaskUnavailableError #119

Closed FraBle closed 5 years ago

FraBle commented 5 years ago
» brew cu -af                                                                                                                                                                                    
==> Options
Include auto-update (-a): true
Include latest (-f): true
==> Updating Homebrew
Already up-to-date.
==> Finding outdated apps
Error: uninitialized constant Cask::Cask::CaskUnavailableError
Did you mean?  Cask::CaskUnavailableError
               TapUnavailableError
               Cask::CaskUnreadableError
/usr/local/Homebrew/Library/Taps/buo/homebrew-cask-upgrade/lib/extend/cask.rb:24:in `rescue in block in installed_apps'
/usr/local/Homebrew/Library/Taps/buo/homebrew-cask-upgrade/lib/extend/cask.rb:13:in `block in installed_apps'
/usr/local/Homebrew/Library/Taps/buo/homebrew-cask-upgrade/lib/extend/cask.rb:11:in `map'
/usr/local/Homebrew/Library/Taps/buo/homebrew-cask-upgrade/lib/extend/cask.rb:11:in `installed_apps'
/usr/local/Homebrew/Library/Taps/buo/homebrew-cask-upgrade/lib/bcu.rb:66:in `find_outdated_apps'
/usr/local/Homebrew/Library/Taps/buo/homebrew-cask-upgrade/lib/bcu.rb:24:in `process'
/usr/local/Homebrew/Library/Taps/buo/homebrew-cask-upgrade/cmd/brew-cu.rb:34:in `<top (required)>'
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.7/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.7/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/usr/local/Homebrew/Library/Homebrew/utils.rb:19:in `require?'
/usr/local/Homebrew/Library/Homebrew/brew.rb:95:in `<main>'

This line should be changed from

      rescue Cask::CaskUnavailableError

to

      rescue CaskUnavailableError
ondrejfuhrer commented 5 years ago

I really hoped that rescue is not needed any more but apparently it is 🙁 But you should get rid of that troublesome cask since it can cause more trouble in the future.

From what I understood the case is that it is an installed cask that is not available any more in the cask list.

DanHanson82 commented 5 years ago

I'm still getting this error and brew cu has been broken for me for several weeks now. Is it working for anybody? Also seeing the pull request from 19 days ago. Are there plans to fix this or should I start searching for alternatives?

ondrejfuhrer commented 5 years ago

@DanHanson82 my suggestion would be to get rid of the cask that is causing the trouble, as I suggested above. Of course, if that is not the case feel free to use that branch from PR to pass that problem for now.

The PR is waiting for @buo to merge it so I hope he will find time.

DanHanson82 commented 5 years ago

Thanks guys! I was going to try that branch @ondrejfuhrer but looks like it got merged and it's working again for me now again. Definitely like the ability to install gui apps and manage them over cli on osx and this project makes that much easier. Thanks again