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

Problem in cask for unpkg 4.6 #85178

Closed Yann-R closed 4 years ago

Yann-R commented 4 years ago

General troubleshooting steps

Description of issue

Error when using Cask for unpkg 4.6 to upgrade my existing version 4.5 already installed with homebrew cask

Command that failed

brew cask upgrade unpkg

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

Error: Cask 'unpkg' definition is invalid: Token '{:v1=>"unpkg"}' in header line does not match the file name.

Output of brew cask doctor

==> Homebrew Version
2.4.2-65-g0b4397f
==> macOS
10.14.6
==> SIP
Enabled
==> Java
13.0.2, 11.0.2, 1.8.0_241, 1.7.0_51, 1.6.0_65-b14-468
==> xattr issues
<NONE>
==> Gatekeeper support
Enabled
==> Homebrew Cask Install Location
<NONE>
==> Homebrew Cask Staging Location
/opt/homebrew/Caskroom
==> Homebrew Cask Taps:
/opt/homebrew/Library/Taps/homebrew/homebrew-cask (3600 casks)
/opt/homebrew/Library/Taps/homebrew/homebrew-cask-versions (154 casks)
/opt/homebrew/Library/Taps/homebrew/homebrew-cask-fonts (1547 casks)
==> Contents of $LOAD_PATH
/opt/homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/ruby-macho-2.2.0/lib
/opt/homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/rubocop-rspec-1.40.0/lib
/opt/homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/rubocop-performance-1.6.1/lib
/opt/homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/rexml-3.2.4/lib
/opt/homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/plist-3.5.0/lib
/opt/homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/mechanize-2.7.6/lib
/opt/homebrew/Library/Homebrew/vendor/bundle/bundler/
/opt/homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/activesupport-6.0.3.2/lib
/opt/homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/zeitwerk-2.3.1/lib
/opt/homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/tzinfo-1.2.7/lib
/opt/homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/thread_safe-0.3.6/lib
/opt/homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/i18n-1.8.3/lib
/opt/homebrew/Library/Homebrew/vendor/bundle/bundler/../ruby/2.6.0/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby
/opt/homebrew/Library/Homebrew/vendor/portable-ruby/2.6.3_2/lib/ruby/2.6.0
/opt/homebrew/Library/Homebrew/vendor/portable-ruby/2.6.3_2/lib/ruby/2.6.0/x86_64-darwin14
/opt/homebrew/Library/Homebrew
==> Environment Variables
LC_ALL="en_US.UTF-8"
PATH="/opt/homebrew/Library/Homebrew/shims/scm:/usr/bin:/bin:/usr/sbin:/sbin"
SHELL="/bin/tcsh"

Output of brew tap

homebrew/cask
homebrew/cask-fonts
homebrew/cask-versions
homebrew/core

Reading the following result of brew cask cat unpkg doesn't help me understand where this error in header with the mentioned token comes from. Any idea?

cask 'unpkg' do
  version '4.6'
  sha256 '6949b648d5cd02138f9e7f505f1fb3541905d6016ed951daa71cb7250c3ace2e'

  # github.com/downloads/timdoug/unpkg/ was verified as official when first introduced to the cask
  url "https://www.timdoug.com/unpkg/unpkg-#{version}.zip"
  appcast 'https://www.timdoug.com/unpkg/'
  name 'unpkg'
  homepage 'https://www.timdoug.com/unpkg/'

  app "unpkg #{version}/unpkg.app"
end
miccal commented 4 years ago

You currently installed version of unpkg is from a very old version of the Cask file -- please run

brew uninstall --force unpkg

then

rm -r "$(brew --prefix)/Caskroom/unpkg"

then

brew cask install unpkg
Yann-R commented 4 years ago

Great! it works.