Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

brew cask zap _foo_ errors with: Error: undefined method fetch' for Hbc::SystemCommand:Class` #21583

Closed
Arcank opened this issue Jun 1, 2016 · 4 comments

Comments

@Arcank
Copy link
Contributor

Arcank commented Jun 1, 2016

Description of issue

brew cask zap _foo_ errors with: Error: undefined methodfetch' for Hbc::SystemCommand:Class`

Output of brew cask zap _foo_ --verbose

% brew cask install gitbox
==> Downloading https://d1oa71y4zxyi0a.cloudfront.net/gitbox-1.6.2-ml.zip
Already downloaded: ~/Library/Caches/Homebrew/gitbox-1.6.2.zip
==> Verifying checksum for Cask gitbox
==> Moving App 'Gitbox.app' to '/Applications/Gitbox.app'
🍺  gitbox staged at '~/caskroom/gitbox/1.6.2' (0B)
% brew cask zap --verbose gitbox
==> Implied "brew cask uninstall gitbox"
==> Removing App: '/Applications/Gitbox.app'
==> Dispatching zap stanza
Error: undefined method `fetch' for Hbc::SystemCommand:Class
  Most likely, this means you have an outdated version of homebrew-cask. Please run:

      brew uninstall --force brew-cask; brew untap phinze/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

~/homebrew/Library/Taps/caskroom/homebrew-cask/lib/hbc/artifact/base.rb:83:in `initialize'
~/homebrew/Library/Taps/caskroom/homebrew-cask/lib/hbc/installer.rb:307:in `new'
~/homebrew/Library/Taps/caskroom/homebrew-cask/lib/hbc/installer.rb:307:in `zap'
~/homebrew/Library/Taps/caskroom/homebrew-cask/lib/hbc/cli/zap.rb:8:in `block in run'
~/homebrew/Library/Taps/caskroom/homebrew-cask/lib/hbc/cli/zap.rb:5:in `each'
~/homebrew/Library/Taps/caskroom/homebrew-cask/lib/hbc/cli/zap.rb:5:in `run'
~/homebrew/Library/Taps/caskroom/homebrew-cask/lib/hbc/cli.rb:83:in `run_command'
~/homebrew/Library/Taps/caskroom/homebrew-cask/lib/hbc/cli.rb:121:in `process'
~/homebrew/Library/Taps/caskroom/homebrew-cask/cmd/brew-cask.rb:26: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'
~/homebrew/Library/brew.rb:22:in `require?'
~/homebrew/Library/brew.rb:93:in `<main>'
Error: Kernel.exit

What I tried

  • I ran brew uninstall --force brew-cask; brew untap phinze/cask; brew update; brew cleanup; brew cask cleanup.
  • I ran brew update; brew cleanup; brew cask cleanup.
  • I ran brew uninstall --force brew-cask; brew update.
  • I ran brew untap phinze/cask; brew untap caskroom/cask; brew update.

Output of brew doctor

Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry and just ignore them. Thanks!

Warning: Your Homebrew is not installed to /usr/local
You can install Homebrew anywhere you want, but some brews may only build
correctly if you install in /usr/local. Sorry!

Output of brew cask doctor

% brew cask doctor
==> OS X Release:
10.11
==> OS X Release with Patchlevel:
10.11.5
==> 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 81081; last commit 2016-06-01)
Homebrew/homebrew-core (git revision ef55; last commit 2016-06-01)
==> Homebrew Executable Path:
~/homebrew/bin/brew
==> Homebrew Cellar Path:
~/homebrew/Cellar
==> Homebrew Repository Path:
~/homebrew
==> Homebrew Origin:
https://github.com/Homebrew/brew.git
==> Homebrew-cask Version:
0.60.0 (git revision 3773; last commit 30 minutes ago)
==> Homebrew-cask Install Location:
<NONE>
==> Homebrew-cask Staging Location:
~/caskroom
==> Homebrew-cask Cached Downloads:
~/Library/Caches/Homebrew
~/Library/Caches/Homebrew/Casks
0 files, 0B
==> Homebrew-cask Default Tap Path:
~/homebrew/Library/Taps/caskroom/homebrew-cask
==> Homebrew-cask Alternate Cask Taps:
~/homebrew/Library/Taps/caskroom/homebrew-versions
==> Homebrew-cask Default Tap Cask Count:
3184
==> Contents of $LOAD_PATH:
~/homebrew/Library/Taps/caskroom/homebrew-cask/lib
~/homebrew/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="~/bin:~/homebrew/bin:~/.gem/bin:~/caskroom/bin:/usr/local/git/current/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:~/homebrew/Library/Taps/caskroom/homebrew-cask/cmd:~/homebrew/Library/Taps/homebrew/homebrew-bundle/cmd:~/homebrew/Library/ENV/scm"
==> Contents of $SHELL Environment Variable:
SHELL="/bin/zsh"
==> Contents of Locale Environment Variables:
LC_CTYPE="UTF-8"
==> Running As Privileged User:
No
@vitorgalvao vitorgalvao added bug Issue describing a reproducible bug. core Issue with Homebrew itself rather than with a specific cask. labels Jun 1, 2016
@vitorgalvao
Copy link
Member

vitorgalvao commented Jun 1, 2016

Can reproduce. Looks like #13966 might’ve broken zap (not sure yet how, or why fetch is the one complaining). I could swear I tried zap in my tests, but might’ve been in the early tries.

Pinging @mwean @jawshooah as well.

@PEM--
Copy link

PEM-- commented Jun 1, 2016

I confirm. Got it too.

@claui
Copy link
Contributor

claui commented Jun 1, 2016

This is the breaking change.

I forgot to include Zap in refactoring. We have never had a proper test for Zap; the most likely reason why it is commented out is that it needs sudo to run.

As a consequence, my blunder went unnoticed. I’m in the middle of preparing a fix right now.

adidalal pushed a commit that referenced this issue Jun 1, 2016
This PR fixes an issue with 6500fa1, in which the (internal) installer API was refactored in preparation for the big change. That refactoring missed one case, causing `zap` to break; see #21583.

There are **no tests** included with this fix due to pre-existing coverage issues. Test will follow in a separate commit.
@vitorgalvao
Copy link
Member

Fixed in #21607.

chizmw pushed a commit to chizmw/homebrew-cask that referenced this issue Jun 15, 2016
…rew#21607)

This PR fixes an issue with 6500fa1, in which the (internal) installer API was refactored in preparation for the big change. That refactoring missed one case, causing `zap` to break; see Homebrew#21583.

There are **no tests** included with this fix due to pre-existing coverage issues. Test will follow in a separate commit.
@miccal miccal removed bug Issue describing a reproducible bug. core Issue with Homebrew itself rather than with a specific cask. labels Dec 23, 2016
@Homebrew Homebrew locked and limited conversation to collaborators May 8, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants