diff options
author | Tim Smith <tim@cozy.co> | 2014-12-01 12:38:06 -0800 |
---|---|---|
committer | Tyler Fitch <tfitch@getchef.com> | 2015-02-11 10:43:50 -0800 |
commit | 57c63509884216ca8240cd2881e545155e1394d1 (patch) | |
tree | d6c5a7841ae3bc608146e03f4d4777eae1c2c951 | |
parent | 4b558813fa284f697122e41ef1f49cca8b467112 (diff) | |
download | ohai-57c63509884216ca8240cd2881e545155e1394d1.tar.gz |
Switch to each_line for parsing php -v output
-rw-r--r-- | lib/ohai/plugins/php.rb | 2 |
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 |