summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tim@cozy.co>2014-12-01 12:38:06 -0800
committerTyler Fitch <tfitch@getchef.com>2015-02-11 10:43:50 -0800
commit57c63509884216ca8240cd2881e545155e1394d1 (patch)
treed6c5a7841ae3bc608146e03f4d4777eae1c2c951
parent4b558813fa284f697122e41ef1f49cca8b467112 (diff)
downloadohai-57c63509884216ca8240cd2881e545155e1394d1.tar.gz
Switch to each_line for parsing php -v output
-rw-r--r--lib/ohai/plugins/php.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ohai/plugins/php.rb b/lib/ohai/plugins/php.rb
index a8c31959..3d950403 100644
--- a/lib/ohai/plugins/php.rb
+++ b/lib/ohai/plugins/php.rb
@@ -28,7 +28,7 @@ Ohai.plugin(:PHP) do
so = shell_out("php -v")
if so.exitstatus == 0
- so.stdout.split(/\r?\n/).each do |line|
+ so.stdout.each_line do |line|
case line
when /PHP (\S+).+built: ([^)]+)/
php[:version] = $1