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 method `puts_stdout_or_stderr' for #<Bcu::Upgrade:0x00007fa3481fc988> #191

Closed hoium closed 2 years ago

hoium commented 2 years ago

Running into the following error when running brew cu -a on two different setups, Intel and M1.

~  brew cu -a                                                                                                   
==> Options
Error: undefined method `puts_stdout_or_stderr' for #<Bcu::Upgrade:0x00007fa3481fc988>
/usr/local/Homebrew/Library/Taps/buo/homebrew-cask-upgrade/lib/bcu/command/upgrade.rb:10:in `process'
/usr/local/Homebrew/Library/Taps/buo/homebrew-cask-upgrade/lib/bcu.rb:20:in `process'
/usr/local/Homebrew/Library/Taps/buo/homebrew-cask-upgrade/cmd/brew-cu.rb:70:in `<top (required)>'
/usr/local/Homebrew/Library/Homebrew/utils.rb:92:in `require'
/usr/local/Homebrew/Library/Homebrew/utils.rb:92:in `require?'
/usr/local/Homebrew/Library/Homebrew/brew.rb:112:in `<main>'
 !  ~  brew update -v                                                                                           
Checking if we need to fetch /usr/local/Homebrew...
Checking if we need to fetch /usr/local/Homebrew/Library/Taps/buo/homebrew-cask-upgrade...
Checking if we need to fetch /usr/local/Homebrew/Library/Taps/homebrew/homebrew-bundle...
Checking if we need to fetch /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask...
Checking if we need to fetch /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask-drivers...
Checking if we need to fetch /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask-fonts...
Checking if we need to fetch /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask-versions...
Checking if we need to fetch /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core...
Checking if we need to fetch /usr/local/Homebrew/Library/Taps/homebrew/homebrew-services...
Checking if we need to fetch /usr/local/Homebrew/Library/Taps/jakewmeyer/homebrew-geo...
Checking if we need to fetch /usr/local/Homebrew/Library/Taps/saulpw/homebrew-vd...
Checking if we need to fetch /usr/local/Homebrew/Library/Taps/tmaone/homebrew-cask-fish-completion...
Already up-to-date. 
~  brew config                                                                                                  
HOMEBREW_VERSION: 3.3.5-25-g7c4247e
ORIGIN: https://github.com/Homebrew/brew
HEAD: 7c4247eec9685071cbadc52952d0f2afadf022cc
Last commit: 46 minutes ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 47e6dc9e7fe7284066ee7159cace7201e7e315fb
Core tap last commit: 2 hours ago
Core tap branch: master
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CASK_OPTS: []
HOMEBREW_CORE_GIT_REMOTE: https://github.com/Homebrew/homebrew-core
HOMEBREW_EDITOR: code -w
HOMEBREW_GITHUB_API_TOKEN: set
HOMEBREW_MAKE_JOBS: 12
Homebrew Ruby: 2.6.8 => /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby
CPU: dodeca-core 64-bit kabylake
Clang: 13.0.0 build 1300
Git: 2.34.0 => /usr/local/bin/git
Curl: 7.77.0 => /usr/bin/curl
macOS: 12.0.1-x86_64
CLT: 13.1.0.0.1.1633545042
Xcode: N/A
hoium commented 2 years ago

I tried untapping and adding the tap back

m-zheng commented 2 years ago

It was all good yesterday. But somehow I am having the same issue now.

hoium commented 2 years ago

@m-zheng Same here - My guess is something with the 3.3.5 Release

Tyrubias commented 2 years ago

I've bisected it and the error started occurring at https://github.com/Homebrew/brew/commit/466f29a16a173c2c381541884649f272fcf51357

It looks like they got ride of the puts_stdout_or_stderr in favor of adding an explicit redirect of stdout to stderr if stdout is not a tty.

lcl2539 commented 2 years ago

Same here

cutiechi commented 2 years ago

Same here

h4rk8s commented 2 years ago

same

tiancheng92 commented 2 years ago

Same +1