Homebrew / homebrew-cask

šŸ» A CLI workflow for the administration of macOS applications distributed as binaries
https://brew.sh
BSD 2-Clause "Simplified" License
20.93k stars 10.71k forks source link

undefined method `undent' #88501

Closed tyhsieh closed 4 years ago

tyhsieh commented 4 years ago

General troubleshooting steps

Description of issue

I have been trying to upgrade, uninstall/install tunnelblick after I upgraded my OS to Catalina, and the error keeps coming up

==> Verifying SHA-256 checksum for Cask 'tunnelblick'. Warning: Unexpected method 'license' called on Cask tunnelblick. Error: Cask 'tunnelblick' is unreadable: undefined methodundent' for #`

Also tried the solution for some similar issues but still doesn't work

`usr/bin/find "$(brew --prefix)/Caskroom/"'/.metadata' -type f -name '.rb' -print0 | /usr/bin/xargs -0 /usr/bin/perl -i -pe 's/depends_on macos: [.?]//gsm;s/depends_on macos: .//g' tsung-yens-air:homebrew-cask tsung-yenhsieh$ tsung-yens-air:homebrew-cask tsung-yenhsieh$ tsung-yens-air:homebrew-cask tsung-yenhsieh$ tsung-yens-air:homebrew-cask tsung-yenhsieh$ tsung-yens-air:homebrew-cask tsung-yenhsieh$ tsung-yens-air:homebrew-cask tsung-yenhsieh$ tsung-yens-air:homebrew-cask tsung-yenhsieh$ tsung-yens-air:homebrew-cask tsung-yenhsieh$ tsung-yens-air:homebrew-cask tsung-yenhsieh$ brew cask reinstall tunnelblick --force ==> Caveats For security reasons, tunnelblick must be installed to /Applications, and will request to be moved at launch.

==> Downloading https://github.com/Tunnelblick/Tunnelblick/releases/download/v3.8.3/Tunnelblick_3.8.3_build_5520.dmg Already downloaded: /Users/tsung-yenhsieh/Library/Caches/Homebrew/downloads/5b4c4bca134b5fe912fd203c3fb7601f0725d1196396590a6605b26056c31da8--Tunnelblick_3.8.3_build_5520.dmg ==> Verifying SHA-256 checksum for Cask 'tunnelblick'. Error: Cask 'tunnelblick' is unreadable: undefined method undent' for #<String:0x00007fa970197348> tsung-yens-air:homebrew-cask tsung-yenhsieh$

Command that failed

brew cask install tunnelblick
brew cask reinstall tunnelblick --force

Output of command with --force --verbose --debug

`==> Cask::Installer#reinstall
==> Cask::Installer#install
==> Printing caveats
==> Caveats
For security reasons, tunnelblick must be installed to /Applications,
and will request to be moved at launch.

==> Cask::Installer#fetch
==> Downloading
==> Downloading https://github.com/Tunnelblick/Tunnelblick/releases/download/v3.8.3/Tunnelblick_3.8.3_build_5520.dmg
/usr/bin/curl --disable --globoff --show-error --user-agent Homebrew/2.4.16-46-g2b4f364\ \(Macintosh\;\ Intel\ Mac\ OS\ X\ 10.15.6\)\ curl/7.64.1 --retry 3 --location --silent --head --request GET https://github.com/Tunnelblick/Tunnelblick/releases/download/v3.8.3/Tunnelblick_3.8.3_build_5520.dmg
Already downloaded: /Users/tsung-yenhsieh/Library/Caches/Homebrew/downloads/5b4c4bca134b5fe912fd203c3fb7601f0725d1196396590a6605b26056c31da8--Tunnelblick_3.8.3_build_5520.dmg
==> Checking quarantine support
/usr/bin/xattr
/usr/bin/swift /usr/local/Homebrew/Library/Homebrew/cask/utils/quarantine.swift
==> Quarantine is available.
==> Verifying Gatekeeper status of /Users/tsung-yenhsieh/Library/Caches/Homebrew/downloads/5b4c4bca134b5fe912fd203c3fb7601f0725d1196396590a6605b26056c31da8--Tunnelblick_3.8.3_build_5520.dmg
/usr/bin/xattr -p com.apple.quarantine /Users/tsung-yenhsieh/Library/Caches/Homebrew/downloads/5b4c4bca134b5fe912fd203c3fb7601f0725d1196396590a6605b26056c31da8--Tunnelblick_3.8.3_build_5520.dmg
==> /Users/tsung-yenhsieh/Library/Caches/Homebrew/downloads/5b4c4bca134b5fe912fd203c3fb7601f0725d1196396590a6605b26056c31da8--Tunnelblick_3.8.3_build_5520.dmg is quarantined
==> Downloaded to -> /Users/tsung-yenhsieh/Library/Caches/Homebrew/downloads/5b4c4bca134b5fe912fd203c3fb7601f0725d1196396590a6605b26056c31da8--Tunnelblick_3.8.3_build_5520.dmg
==> Verifying SHA-256 checksum for Cask 'tunnelblick'.
hdiutil imageinfo -format /Users/tsung-yenhsieh/Library/Caches/Homebrew/downloads/5b4c4bca134b5fe912fd203c3fb7601f0725d1196396590a6605b26056c31da8--Tunnelblick_3.8.3_build_5520.dmg
Warning: Unexpected method 'license' called on Cask tunnelblick.
Follow the instructions here:
  https://github.com/Homebrew/homebrew-cask#reporting-bugs
Error: Cask 'tunnelblick' is unreadable: undefined method `undent' for #<String:0x00007fc798a3e1b8>
/usr/local/Homebrew/Library/Homebrew/cask/cask_loader.rb:71:in `rescue in load'
/usr/local/Homebrew/Library/Homebrew/cask/cask_loader.rb:66:in `load'
/usr/local/Homebrew/Library/Homebrew/cask/cask_loader.rb:194:in `load'
/usr/local/Homebrew/Library/Homebrew/cask/installer.rb:138:in `uninstall_existing_cask'
/usr/local/Homebrew/Library/Homebrew/cask/installer.rb:94:in `install'
/usr/local/Homebrew/Library/Homebrew/cask/installer.rb:130:in `reinstall'
/usr/local/Homebrew/Library/Homebrew/cask/cmd/reinstall.rb:48:in `block in reinstall_casks'
/usr/local/Homebrew/Library/Homebrew/cask/cmd/reinstall.rb:47:in `each'
/usr/local/Homebrew/Library/Homebrew/cask/cmd/reinstall.rb:47:in `reinstall_casks'
/usr/local/Homebrew/Library/Homebrew/cask/cmd/reinstall.rb:14:in `run'
/usr/local/Homebrew/Library/Homebrew/cask/cmd/abstract_command.rb:89:in `run'
/usr/local/Homebrew/Library/Homebrew/cask/cmd.rb:238:in `run'
/usr/local/Homebrew/Library/Homebrew/cask/cmd.rb:165:in `run'
/usr/local/Homebrew/Library/Homebrew/cmd/cask.rb:14:in `cask'
/usr/local/Homebrew/Library/Homebrew/brew.rb:113:in `<main>'
Error: Kernel.exit
/usr/local/Homebrew/Library/Homebrew/cask/cmd.rb:243:in `exit'
/usr/local/Homebrew/Library/Homebrew/cask/cmd.rb:243:in `rescue in run'
/usr/local/Homebrew/Library/Homebrew/cask/cmd.rb:213:in `run'
/usr/local/Homebrew/Library/Homebrew/cask/cmd.rb:165:in `run'
/usr/local/Homebrew/Library/Homebrew/cmd/cask.rb:14:in `cask'
/usr/local/Homebrew/Library/Homebrew/brew.rb:113:in `<main>'` 

Output of brew cask doctor

==> Homebrew Version
2.4.16-46-g2b4f364
==> macOS
10.15.6
==> SIP
Enabled
==> Java
N/A
==> Homebrew Cask Staging Location
/usr/local/Caskroom
==> Homebrew Cask Taps:
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask (3644 casks)
==> $LOAD_PATHS
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/ruby-macho-2.2.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/rubocop-rspec-1.43.2/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/rubocop-performance-1.7.1/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/plist-3.5.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/patchelf-1.3.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/mechanize-2.7.6/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/elftools-1.1.3/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/bindata-2.4.8/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/activesupport-6.0.3.2/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/zeitwerk-2.4.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/tzinfo-1.2.7/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/thread_safe-0.3.6/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/i18n-1.8.5/lib
/usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/concurrent-ruby-1.1.7/lib/concurrent-ruby
/Library/Ruby/Site/2.6.0
/Library/Ruby/Site/2.6.0/universal-darwin19
/Library/Ruby/Site
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/vendor_ruby/2.6.0
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/vendor_ruby/2.6.0/universal-darwin19
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/vendor_ruby
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/universal-darwin19
/usr/local/Homebrew/Library/Homebrew
==> Cask Environment Variables:
BUNDLE_PATH
CHRUBY_VERSION
GEM_HOME
GEM_PATH
HOMEBREW_CASK_OPTS
LC_ALL
PATH
RBENV_VERSION
RUBYLIB
RUBYOPT
RUBYPATH
SHELL

Output of brew tap

homebrew/cask
homebrew/core
tyhsieh commented 4 years ago

solved the issue with rm -rf "$(brew --prefix)/Caskroom/tunnelblick" && brew cask install tunnelblick