$ brew cu
Error: undefined method `caskroom' for Hbc:Module
/usr/local/Homebrew/Library/Taps/buo/homebrew-cask-upgrade/lib/extend/hbc.rb:1:in `<top (required)>'
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3_2/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3_2/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/usr/local/Homebrew/Library/Taps/buo/homebrew-cask-upgrade/lib/bcu.rb:6:in `<top (required)>'
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3_2/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3_2/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/usr/local/Homebrew/Library/Taps/buo/homebrew-cask-upgrade/cmd/brew-cu.rb:32:in `<top (required)>'
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3_2/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3_2/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/usr/local/Homebrew/Library/Homebrew/utils.rb:18:in `require?'
/usr/local/Homebrew/Library/Homebrew/brew.rb:105:in `<main>'
$ brew --version
Homebrew 1.6.7-56-g9ebcef7
Homebrew/homebrew-core (git revision 512758; last commit 2018-06-09)
$ brew cask --version
Homebrew-Cask 1.6.7-56-g9ebcef7
Homebrew/homebrew-cask (git revision c97f0; last commit 2018-06-09)
$ brew irb
=> Interactive Homebrew Shell
Example commands available with: brew irb --examples
irb(main):001:0> Hbc.methods.grep /cask/
=> []
@goodwillcoding You are correct. Many thanks. Let me write down the way I rephrase it.
go to
/usr/local/Homebrew/Library/Taps/buo/homebrew-cask-upgrade/lib/extend/hbc.rb
and change the first lineCASKROOM= Hbc.Caskroom
toCASKROOM=Hbc::Caskroom.path
That’s it.
A quick
git-bisect start 9ebcef78 61bcec42
in/usr/local/Homebrew
shows this is the breaking commit.Hey @reitermarkus
I can of course speak only for myself and I am aware that this option is out there. If I put aside much nicer “UI”, the main differences for me are:
Easier usage - I don’t have to run more commands to know what I’m going to update and the updating itself (I run only
brew cu
instead ofbrew cask outdated
andbrew cask upgrade
)Better handling of auto-update casks. I.e. this morning: After funning
brew cu -ac
After running
brew cask outdated
After running
brew cask outdated --greedy
So in this case I either update only
plex-media-player
or all “latest” and auto-update apps. That does not happen inbrew cu
Those are the biggest advantages for me right now.
@reitermarkus Well, in this case (
google-chrome
) it is useful. Of course, you will get the same version just by running it and leave the updating to the app. But the cask also have the version written inside, so you end up with inconsistency between the installed version detected by brew and the actual installed version. But of course, that it super minor thing since the end is the same - you have up-to-date software which should be the goal.Regarding the first one @jenhsun already touched the surface. Of course I don’t have to run
outdated
before, but I want to know, what I’m going to update before I start to do it. Why? For example I always quit the application before I update in order to have the update smoother.What
brew cu
brings here very nicely is the overview, what are the outdated casks and then you just confirm or not confirm, that you want to update. And you don’t have to run other command to do so.I hope that clarifies my point of view here 🙂
I meant no offence, and apologise if I did offend.
Fair. I hadn’t considered that.
I can guarantee downgrades have happened, but it’s unlikely they have been problematic.
So did I. The point is I’m asking you to not trust those at all from a security standpoint. It’s not their goal.
And Travis CI. But that is fine; that’s exactly what they’re for, integrity checks.
Thumbs up to that. Again, I had no intention to belittle your method.
@reitermarkus My reasoning is similar to what @ondrejfuhrer described: I basically want to include apps that have
auto_updates true
in the upgrade. There are two main reasons for that (see also #53):As far as I can see, I could kind of get that using
brew cask upgrade --greedy
, but that’ll always includeversion :latest
apps. These don’t really fit nicely into the concept described above, but they’re a reality and re-downloading them all the time is not an efficient solution.Since #53,
brew cu
allows to include apps withauto_updates true
while excluding those withversion :latest
, which is not ideal, but viable. I don’t think this is possible withbrew cask upgrade
.That part at least will never be possible. Homebrew is non-interactive by design. However we would definitely accept a PR which provides a nicer overview.
Hey, @karlrabe please run this https://github.com/buo/homebrew-cask-upgrade/issues/97#issuecomment-396161489