Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add more explicit upgrade check for pear

- Copied Mark's pear upgrade block from phpunit cookbook. Now it will
  only upgrade pear if the current version is less than 1.9.1
  • Loading branch information...
commit 72d9243665de251903f0994dc9f36a7e600ed708 1 parent 97dff3a
David King dkingofpa authored
Showing with 4 additions and 4 deletions.
  1. +4 −4 recipes/default.rb
8 recipes/default.rb
View
@@ -17,11 +17,11 @@
include_recipe "php"
-# Upgrade PEAR to latest stable version
-# For example, 1.9.4 works for drush, but 1.9.0 does not
-php_pear 'pear' do
- preferred_state "stable"
+# Upgrade PEAR if current version is < 1.9.1
+php_pear "pear" do
+ cur_version = `pear -V| head -1| awk -F': ' '{print $2}'`
action :upgrade
+ not_if { Gem::Version.new(cur_version) > Gem::Version.new('1.9.0') }
end
# Initialize drush PEAR channel
Please sign in to comment.
Something went wrong with that request. Please try again.