homebrew-cask: Bug report: `info` of outdated cask raises

brew cask info atom errors with No such file or directory - /usr/local/Caskroom/atom/1.9.8. Looking inside /usr/local/Caskroom/atom, I appear to have version 1.9.7 installed. I moved another, unrelated cask’s inner folder to a different name, ran brew cask info other_cask and had the same error pop up.

Output of brew cask info atom --verbose

Error: No such file or directory - /usr/local/Caskroom/atom/1.9.8
  Most likely, this means you have an outdated version of Homebrew-Cask. Please run:

      brew uninstall --force brew-cask; brew untap phinze/cask; brew untap caskroom/cask; brew update; brew cleanup; brew cask cleanup

  If this doesn’t fix the problem, please report this bug:

      https://github.com/caskroom/homebrew-cask#reporting-bugs

/usr/local/Library/Homebrew/extend/pathname.rb:50:in `lstat'
/usr/local/Library/Homebrew/extend/pathname.rb:50:in `lstat'
/usr/local/Library/Homebrew/extend/pathname.rb:50:in `compute_disk_usage'
/usr/local/Library/Homebrew/extend/pathname.rb:21:in `abv'
/usr/local/Library/Taps/caskroom/homebrew-cask/lib/hbc/cli/info.rb:19:in `info'
/usr/local/Library/Taps/caskroom/homebrew-cask/lib/hbc/cli/info.rb:8:in `block in run'
/usr/local/Library/Taps/caskroom/homebrew-cask/lib/hbc/cli/info.rb:5:in `each'
/usr/local/Library/Taps/caskroom/homebrew-cask/lib/hbc/cli/info.rb:5:in `run'
/usr/local/Library/Taps/caskroom/homebrew-cask/lib/hbc/cli.rb:108:in `run_command'
/usr/local/Library/Taps/caskroom/homebrew-cask/lib/hbc/cli.rb:146:in `process'
/usr/local/Library/Taps/caskroom/homebrew-cask/cmd/brew-cask.rb:23:in `<top (required)>'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/usr/local/Library/Homebrew/brew.rb:22:in `require?'
/usr/local/Library/Homebrew/brew.rb:93:in `<main>'
Error: Kernel.exit

Output of brew doctor

Output of brew cask doctor

==> macOS Release:
10.11.6
==> Hardware Architecture:
intel-64
==> Ruby Version:
2.0.0-p648
==> Ruby Path:
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
==> Homebrew Version:
Homebrew 0.9.9 (git revision b40b0; last commit 2016-08-13)
Homebrew/homebrew-core (git revision 35ae; last commit 2016-08-13)
==> Homebrew Executable Path:
/usr/local/bin/brew
==> Homebrew Cellar Path:
/usr/local/Cellar
==> Homebrew Repository Path:
/usr/local
==> Homebrew Origin:
https://github.com/Homebrew/brew
==> Homebrew-Cask Version:
0.60.0 (git revision 96c1; last commit 5 hours ago)
==> Homebrew-Cask Install Location:
<NONE>
==> Homebrew-Cask Staging Location:
/usr/local/Caskroom
==> Homebrew-Cask Cached Downloads:
/Users/.../Library/Caches/Homebrew/Cask
0 files, 0B
==> Homebrew-Cask Default Tap Path:
/usr/local/Library/Taps/caskroom/homebrew-cask
==> Homebrew-Cask Alternate Cask Taps:
<NONE>
==> Homebrew-Cask Default Tap Cask Count:
3257
==> Contents of $LOAD_PATH:
/usr/local/Library/Taps/caskroom/homebrew-cask/lib
/usr/local/Library/Homebrew
/Library/Ruby/Site/2.0.0
/Library/Ruby/Site/2.0.0/x86_64-darwin15
/Library/Ruby/Site/2.0.0/universal-darwin15
/Library/Ruby/Site
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/vendor_ruby/2.0.0
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/vendor_ruby/2.0.0/x86_64-darwin15
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/vendor_ruby/2.0.0/universal-darwin15
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/vendor_ruby
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/x86_64-darwin15
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/universal-darwin15
==> Contents of $RUBYLIB Environment Variable:
<NONE>
==> Contents of $RUBYOPT Environment Variable:
<NONE>
==> Contents of $RUBYPATH Environment Variable:
<NONE>
==> Contents of $RBENV_VERSION Environment Variable:
<NONE>
==> Contents of $CHRUBY_VERSION Environment Variable:
<NONE>
==> Contents of $GEM_HOME Environment Variable:
<NONE>
==> Contents of $GEM_PATH Environment Variable:
<NONE>
==> Contents of $BUNDLE_PATH Environment Variable:
<NONE>
==> Contents of $PATH Environment Variable:
PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/Library/Taps/caskroom/homebrew-cask/cmd:/usr/local/Library/Taps/homebrew/homebrew-services/cmd:/usr/local/Library/Homebrew/shims/scm"
==> Contents of $SHELL Environment Variable:
SHELL="/usr/local/bin/fish"
==> Contents of Locale Environment Variables:
LANG="en_GB.UTF-8"
==> Running As Privileged User:
No

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Reactions: 2
  • Comments: 20 (19 by maintainers)

Most upvoted comments

Would it make sense to add a line to info to show when a cask is installed but not current? Analogously to Not installed. For example:

mono-mdk: 4.4.2.11
http://mono-project.com/
Not up-to-date
/opt/homebrew-cask/Caskroom/mono-mdk/4.2.1.102 (does not exist)
/opt/homebrew-cask/Caskroom/mono-mdk/4.4.0.142 (295.0M)
/opt/homebrew-cask/Caskroom/mono-mdk/4.4.1.0 (302.6M)
From: https://github.com/caskroom/homebrew-cask/blob/master/Casks/mono-mdk.rb
==> Name
Mono
==> Artifacts
MonoFramework-MDK-4.4.2.11.macos10.xamarin.universal.pkg (pkg)

That’s more a lack of fault tolerance than an actual bug. The new info lists all prior versions you’ve got installed; it derives these from the hidden ‘metadata’ folder. You appear to have deleted the cask version folders but retained their corresponding metadata entries. Try running cd /opt/homebrew-cask/Caskroom/calibre; ls .metadata | xargs mkdir and then brew cask info calibre again.

@sanyer That comment instructs you not to tap phinze/cask, not untap it. Some folks have been using Homebrew Cask since the days when @phinze ran the show, and they may have an old tap lying around causing bugs. The suggestion is still relevant to those users.