Homebrew-cask: Vagrant cask not updating

Created on 23 Oct 2015  Â·  10Comments  Â·  Source: Homebrew/homebrew-cask

The current brew-cask version of Vagrant is 1.7.4 -> /Casks/vagrant.rb

netweb@MacBook /opt/vagrant/bin
$ vagrant --version
Vagrant 1.7.1

Trying to force an upgrade:

netweb@MacBook /opt/vagrant/bin
$ brew cask update vagrant
Already up-to-date.

Checking the info of the Vagrant package shows v1.7.4

netweb@MacBook ~/dev/vagrant-one [develop]
$ brew cask info vagrant
vagrant: 1.7.4
Vagrant
https://www.vagrantup.com/
Not installed
https://github.com/caskroom/homebrew-cask/blob/master/Casks/vagrant.rb
==> Contents
  Vagrant.pkg (pkg)

Vagrant is shown as installed cask:

netweb@MacBook ~/dev/vagrant-one [develop]
$ brew cask list
alfred           dropbox          licecap          paw              spotify          vlc
atom             github (!)       little-snitch        poedit           tower            xtrafinder
cloudup          google-chrome-canary     netnewswire          sabnzbd          vagrant
commandq         kaleidoscope         p4merge          sequel-pro           vagrant-manager
dash             keepassx         path-finder          spectacle            virtualbox

Running the suggested debug results in an error:

netweb@MacBook /opt/vagrant/bin
$ brew update && brew upgrade brew-cask && brew cleanup && brew cask cleanup
Already up-to-date.
Error: caskroom/cask/brew-cask 0.58.0 already installed

I ran them individually and 3 of 4 worked as expected:

netweb@MacBook /opt/vagrant/bin
$ brew upgrade brew-cask
Error: caskroom/cask/brew-cask 0.58.0 already installed

Doctor, doctor:

netweb@MacBook /opt/vagrant/bin
$ brew cask doctor
==> OS X Release:
10.11
==> OS X Release with Patchlevel:
10.11.1
==> Hardware Architecture:
intel-64
==> Ruby Version:
2.0.0-p645
==> Ruby Path:
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
==> Homebrew Version:
0.9.5 (git revision dc5a7e; last commit 2015-10-22)
==> 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.58.0
==> Homebrew-cask Install Location:
/usr/local/Cellar/brew-cask/0.58.0
==> Homebrew-cask Staging Location:
/opt/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:
/usr/local/Library/Taps/caskroom/homebrew-versions
==> Homebrew-cask Default Tap Cask Count:
2823
==> Contents of $LOAD_PATH:
/usr/local/Cellar/brew-cask/0.58.0/rubylib
/Library/Ruby/Gems/2.0.0/gems/psych-2.0.15/lib
/Library/Ruby/Gems/2.0.0/extensions/universal-darwin-15/2.0.0/psych-2.0.15
/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/sbin:/Users/netweb/.composer/vendor/bin:/usr/local/opt/php56/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/Library/Taps/homebrew/homebrew-services/cmd:/usr/local/Library/ENV/scm"
==> Contents of $SHELL Environment Variable:
SHELL="/bin/bash"
==> Contents of Locale Environment Variables:
LANG="en_AU.UTF-8"
==> Running As Privileged User:
No

All 10 comments

The above is the same for Virtualbox Casks/virtualbox, presumably there will be more casks affected by this

Without uninstalling etc I just ran brew cask install vagrant which installed Vagrant 1.7.4

Now Vagrant is showing as installed and the directory it is installed in:

netweb@MacBook /opt/vagrant/bin
$ brew cask info vagrant
vagrant: 1.7.4
Vagrant
https://www.vagrantup.com/
/opt/homebrew-cask/Caskroom/vagrant/1.7.4 (6 files, 82M)
https://github.com/caskroom/homebrew-cask/blob/master/Casks/vagrant.rb
==> Contents
  Vagrant.pkg (pkg)

Have done the same for Virtualbox, both packages are now working as expected but this should have been achievable by running brew cask update vagrant, so that isn't running correctly nor is the detection detecting the version installed!

but this should have been achievable by running brew cask update vagrant

No, it shouldn’t. It says right there when you run brew cask --help:

update     a synonym for 'brew update'

Which just means “update formula and cask definitions”. upgrade is the homebrew verb to install newer versions of apps, and homebrew-cask doesn’t currently have one. There are tons of issues on this.

so that isn't running correctly

Yes, it is.

Ahhh, thanks :+1:

fwiw, i had 1.7 installed and ran the update cmd and info stated the version was now 1.8.1 but also showed as not installed. After i ran the install cmd again, vagrant -v now shows correctly.

brew cask update vagrant
brew cask info vagrant
  vagrant: 1.8.1
  Vagrant
  https://www.vagrantup.com/
  Not installed
  https://github.com/caskroom/homebrew-cask/blob/master/Casks/vagrant.rb

MacBook-Pro:~/Documents/repos/cjin/kivy-temp$ vagrant -v
  Vagrant 1.7.4

brew cask doctor
brew cask install vagrant
vagrant -v : 
  Vagrant 1.8.1

This is still an issue...

I reinstalled it and got the latest version.
I would have expected brew update or brew cask upgrade vagrant to have worked.

No, it isn't. brew update doesn't do what you think it does, and brew cask upgrade doesn't exist yet. Please read the docs.

@jawshooah Thanks I see now

For anyone else see docs

Thanks @timja-kainos
If you guys are too lazy to check the docs:
brew cask install --force vagrant
Force install to update new version instead.

running brew cask install --force vagrant did not work for me. It was still updating based on 1.8.6
I had to run brew cask update first and then run brew cask install --force vagrant again before it got 1.9.2

Was this page helpful?
0 / 5 - 0 ratings