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 doctor error "Error: wrong number of arguments (1 for 0)" #12272

Closed
psyrendust opened this issue Jul 1, 2015 · 9 comments
Closed

Comments

@psyrendust
Copy link

When running brew cask doctor I get the following output:

 larrygordon in /usr
○ → brew cask doctor
Error: wrong number of arguments (1 for 0)

  Most likely, this means you have an outdated version of homebrew-cask. Please run:

      brew update && brew upgrade brew-cask && brew cleanup && brew cask cleanup

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

      https://github.com/caskroom/homebrew-cask/issues

/usr/local/Cellar/brew-cask/0.54.1/rubylib/hbc/cli/doctor.rb:2:in `run'
/usr/local/Cellar/brew-cask/0.54.1/rubylib/hbc/cli.rb:79:in `run_command'
/usr/local/Cellar/brew-cask/0.54.1/rubylib/hbc/cli.rb:119:in `process'
/usr/local/Cellar/brew-cask/0.54.1/rubylib/brew-cask-cmd.rb:18:in `<main>'

 larrygordon in /usr
○ → brew update && brew upgrade brew-cask && brew cleanup && brew cask cleanup
Already up-to-date.
Error: caskroom/cask/brew-cask 0.54.1 already installed

 larrygordon in /usr
○ → brew --version
0.9.5

 larrygordon in /usr
○ → ruby --version
ruby 2.0.0p481 (2014-05-08 revision 45883) [universal.x86_64-darwin14]

Here is my system info:

System Info

Software:

    System Software Overview:

      System Version: OS X 10.10.3 (14D136)
      Kernel Version: Darwin 14.3.0
      Time since boot: 2 days 4:54

Hardware:

    Hardware Overview:

      Model Name: MacBook Pro
      Model Identifier: MacBookPro11,3
      Processor Name: Intel Core i7
      Processor Speed: 2.8 GHz
      Number of Processors: 1
      Total Number of Cores: 4
      L2 Cache (per Core): 256 KB
      L3 Cache: 6 MB
      Memory: 16 GB
      Boot ROM Version: MBP112.0138.B14
      SMC Version (system): 2.19f12
@vitorgalvao
Copy link
Member

Can’t reproduce. Can anyone of @caskroom/maintainers?

@vitorgalvao vitorgalvao added the awaiting maintainer feedback Issue needs response from a maintainer. label Jul 1, 2015
@claui
Copy link
Contributor

claui commented Jul 1, 2015

@psyrendust Could you please do echo $HOMEBREW_CASK_OPTS and post the result here?

@psyrendust
Copy link
Author

 larrygordon in ~
○ → echo $HOMEBREW_CASK_OPTS
--appdir=/Applications --binarydir=/usr/local/bin --caskroom=/usr/homebrew-cask/Caskroom --fontdir=~/Library/Fonts --input_methoddir=~/Library/Input\ Methods --prefpanedir=~/Library/PreferencePanes --qlplugindir=~/Library/QuickLook --screen_saverdir=~/Library/Screen\ Savers --widgetdir=~/Library/Widgets

@psyrendust
Copy link
Author

It also doesn't list any of the casks that I installed either:

 larrygordon in ~
○ → brew cask list --verbose
Error: No available Cask for --widgetdir=~/Library/Widgets

 larrygordon in ~
○ → ls /usr/homebrew-cask/Caskroom
animated-gif-quicklook  cert-quicklook  qlcolorcode  qlmarkdown     qlstephen  quicklook-csv   quicknfo            webpquicklook
betterzipql             provisionql     qlimagesize  qlprettypatch  qlvideo    quicklook-json  suspicious-package

Which is really odd. I uninstalled brew-cask and reinstalled it after a restart of my machine. I'm still seeing the same results.

@vitorgalvao
Copy link
Member

Try removing options from HOMEBREW_CASK_OPTS. Not only are most of those redundant, at least one of them doesn’t exist anymore (--widgetdir, as widget support as been removed a while ago) and is likely the issue, as per you last post.

@claui
Copy link
Contributor

claui commented Jul 1, 2015

I suspect the issue might be caused by your HOMEBREW_CASK_OPTS environment variable containing the

--widgetdir

option, which homebrew-cask no longer supports. Support for widgets has been removed altogether earlier this year as per #8751.

To fix this, locate the file where your HOMEBREW_CASK_OPTS is being declared. (If unsure, do grep -R HOMEBREW_CASK_OPTS ~/.*). Edit that file and remove the part from your HOMEBREW_CASK_OPTS variable where it says --widgetdir=~/Library/Widgets. Close Terminal.app and try again.

Does that fix both issues?

@claui
Copy link
Contributor

claui commented Jul 1, 2015

@vitorgalvao High five 😂

@vitorgalvao
Copy link
Member

So close. I still saw your comment appear mere seconds after. Nice thinking with the HOMEBREW_CASK_OPTS.

@psyrendust
Copy link
Author

Success! Removing --widgetdir option did it.

 larrygordon in ~
○ → brew cask doctor
==> OS X Release:
10.10
==> OS X Release with Patchlevel:
10.10.3
==> Hardware Architecture:
intel-64
==> Ruby Version:
2.0.0-p481
==> Ruby Path:
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
==> Homebrew Version:
0.9.5
==> Homebrew Executable Path:
/usr/local/bin/brew
==> Homebrew Cellar Path:
/usr/local/Cellar
==> Homebrew Repository Path:
/usr/local
==> Homebrew Origin:
https://github.com/Homebrew/homebrew
==> Homebrew-cask Version:
0.54.1
==> Homebrew-cask Install Location:
/usr/local/Cellar/brew-cask/0.54.1
==> Homebrew-cask Staging Location:
/usr/homebrew-cask/Caskroom
==> Homebrew-cask Cached Downloads:
/Library/Caches/Homebrew
/Library/Caches/Homebrew/Casks
0 files
0.00 megs
==> Homebrew-cask Default Tap Path:
/usr/local/Library/Taps/caskroom/homebrew-cask
==> Homebrew-cask Alternate Cask Taps:
<NONE>
==> Homebrew-cask Default Tap Cask Count:
2609
==> Contents of $LOAD_PATH:
/usr/local/Cellar/brew-cask/0.54.1/rubylib
/Library/Ruby/Site/2.0.0
/Library/Ruby/Site/2.0.0/x86_64-darwin14
/Library/Ruby/Site/2.0.0/universal-darwin14
/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-darwin14
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/vendor_ruby/2.0.0/universal-darwin14
/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-darwin14
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/universal-darwin14
==> 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="/Users/larrygordon/.nvm/versions/io.js/v2.3.1/bin:/Users/larrygordon/.dotfiles/plugins/asciinema2gif/bin:/Users/larrygordon/.dotfiles/plugins/safe-rm/bin:/Users/larrygordon/.dotfiles/plugins/pretty-print/bin:/Users/larrygordon/.dotfiles/plugins/sublime/bin:/Users/larrygordon/.dotfiles/plugins/npmlist/bin:/Users/larrygordon/.dotfiles/bin:/Users/larrygordon/.tmpbin:/usr/local/opt/coreutils/libexec/gnubin:/usr/local/opt/go/libexec/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/larrygordon/.rvm/bin:/usr/local/Library/ENV/scm"
==> Contents of $SHELL Environment Variable:
SHELL="/bin/zsh"
==> Contents of Locale Environment Variables:
LANG="en_US.UTF-8"
LC_CTYPE="en_US.UTF-8"
==> Running As Privileged User:
No

 larrygordon in ~
○ → brew cask list
animated-gif-quicklook   provisionql          qlmarkdown           qlvideo          quicknfo
betterzipql      qlcolorcode          qlprettypatch        quicklook-csv        suspicious-package
cert-quicklook       qlimagesize          qlstephen        quicklook-json       webpquicklook

@adidalal adidalal removed the awaiting maintainer feedback Issue needs response from a maintainer. label Apr 12, 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

4 participants