brew upgrade <package> does not update to the latest version
Asked Answered
E

1

7

I've noticed this happening a few times but this most recent instance is with wp-cli Running brew upgrade wp-cli does not download the latest version.

$ brew upgrade wp-cli
Error: homebrew/php/wp-cli 0.20.1 already installed

$ brew info wp-cli
homebrew/php/wp-cli: stable 0.20.1, HEAD
A set of command-line tools for managing WordPress installations.
http://wp-cli.org/
/usr/local/Cellar/wp-cli/0.20.1 (2635 files, 15M) *
  Built from source
From: https://github.com/Homebrew/homebrew-php/blob/master/Formula/wp-cli.rb

Note the version is 0.20.1. When I check the formula repo, I see,

head "https://github.com/wp-cli/wp-cli.git"

When I check that repo, I see that the version in the master branch is 0.24.0. brew info and wp --version both return 0.20.1. Why isnt Homebrew grabbing the latest version? How do I force it to get the latest?

Enrique answered 3/5, 2016 at 22:5 Comment(2)
what if you run brew update first ?Ipsambul
Yep. That was it. I could have sworn I did that multiple times but apparently I didnt. Make it an answer and I'll accept it.Enrique
I
14

You'll need to run brew update first to force brew to update its list of formulae.

Ipsambul answered 3/5, 2016 at 22:30 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.