buo / homebrew-cask-upgrade

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

Error: undefined local variable or method `verbose_flag' for Bcu:Module #159

Closed americanhanko closed 4 years ago

americanhanko commented 4 years ago

I've seen the following error twice now when upgrading outdated casks:

Error: undefined local variable or method `verbose_flag' for Bcu:Module

Seems to fail when running it with the following options:

brew cu --all --cleanup --no-brew-update --yes

The full output of the error:

==> Found outdated apps
     Cask  Current  Latest  A/U    Result
1/1  dash  5.1.4    5.1.5    Y   [ FORCED ]

==> Upgrading dash to 5.1.5
==> Downloading https://kapeli.com/downloads/v5/Dash.zip
######################################################################## 100.0%
==> Verifying SHA-256 checksum for Cask 'dash'.
==> Installing Cask dash
Warning: It seems there is already an App at '/Applications/Dash.app'; overwriting.
==> Removing App '/Applications/Dash.app'.
==> Moving App 'Dash.app' to '/Applications/Dash.app'.
🍺  dash was successfully installed!
Error: undefined local variable or method `verbose_flag' for Bcu:Module
/usr/local/Homebrew/Library/Taps/buo/homebrew-cask-upgrade/lib/bcu.rb:112:in `process'
/usr/local/Homebrew/Library/Taps/buo/homebrew-cask-upgrade/cmd/brew-cu.rb:60:in `<top (required)>'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/usr/local/Homebrew/Library/Homebrew/utils.rb:81:in `require?'
/usr/local/Homebrew/Library/Homebrew/brew.rb:112:in `<main>'
ondrejfuhrer commented 4 years ago

Hello @americanhanko , thank you for reporting that. it should be fixed. Please make sure you run it without --no-brew-update flag so that you get the latest version

Sorry for the inconvenience!

americanhanko commented 4 years ago

Thanks @ondrejfuhrer — just updated. I haven't seen any more cask upgrades since, but I'll take your work for it. Thanks for the quick reply, much appreciated.