Skip to content

Commit

Permalink
Revert regex change for pear installation
Browse files Browse the repository at this point in the history
Signed-off-by: ArtofBugs <74070945+ArtofBugs@users.noreply.github.com>
  • Loading branch information
ArtofBugs committed Mar 11, 2024
1 parent d79b400 commit a76a12a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions resources/install.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
property :ext_dir, String, default: lazy { php_ext_dir }

action :install do
package 'Install PHP Packages' do
package_name new_resource.packages
package new_resource.packages do
options new_resource.options
end

Expand Down
6 changes: 3 additions & 3 deletions resources/pear.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ def grep_for_version(stdout, package)
# Horde_Url -n/a-/(1.0.0beta1 beta) Horde Url class
# Horde_Url 1.0.0beta1 (beta) 1.0.0beta1 Horde Url class
version = m.split(/\s+/)[1].strip
version = if version.split(%r{///})[0] =~ /.\./
version = if version.split(%r{/\//})[0] =~ /.\./
# 1.1.4/(1.1.4 stable)
version.split(%r{///})[0]
version.split(%r{/\//})[0]
else
# -n/a-/(1.0.0beta1 beta)
version.split(%r{/(.*)/\((.*)/}).last.split(/\s/)[0]
version.split(%r{/(.*)\/\((.*)/}).last.split(/\s/)[0]
end
end
version
Expand Down

0 comments on commit a76a12a

Please sign in to comment.