summaryrefslogtreecommitdiff
path: root/lib/ohai/plugins/darwin/system_profiler.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ohai/plugins/darwin/system_profiler.rb')
-rw-r--r--lib/ohai/plugins/darwin/system_profiler.rb8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/ohai/plugins/darwin/system_profiler.rb b/lib/ohai/plugins/darwin/system_profiler.rb
index 86efcb71..5c364beb 100644
--- a/lib/ohai/plugins/darwin/system_profiler.rb
+++ b/lib/ohai/plugins/darwin/system_profiler.rb
@@ -59,11 +59,9 @@ Ohai.plugin do
}
detail_level.each do |level, data_types|
- popen4("system_profiler -xml -detailLevel #{level} #{data_types.join(' ')}") do |pid, stdin, stdout, stderr|
- stdin.close
- Plist::parse_xml(stdout.read).each do |e|
- items << e
- end
+ so = shell_out("system_profiler -xml -detailLevel #{level} #{data_types.join(' ')}")
+ Plist::parse_xml(so.stdout).each do |e|
+ items << e
end
end