sous-chefs / homebrew

Development repository for the homebrew cookbook
https://supermarket.chef.io/cookbooks/homebrew
Apache License 2.0
152 stars 136 forks source link

Update candidate version to work with brew 0.9.2's info command #4

Closed Govan closed 12 years ago

Govan commented 12 years ago

candidate_version relies on an awk expression that now works with brew 0.9.2

candidate_version parses the output of brew info with a regex incorporating a whitespace.

awk assumes that brew info will format output as:

tmux stable 1.6, HEAD

However, brew 0.9.2 formats as

tmux: stable 1.6, HEAD

The old awk regex couldn't pick up the 0.9.2 formatting and would always no available packages.

New awk regex is sensitive to both whitespace and colon formatted info.

See the change in brew here

Govan commented 12 years ago

Sorry, didn't see https://github.com/opscode-cookbooks/homebrew/pull/2