diff options
Diffstat (limited to 'lib/chef/provider/group/dscl.rb')
-rw-r--r-- | lib/chef/provider/group/dscl.rb | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/chef/provider/group/dscl.rb b/lib/chef/provider/group/dscl.rb index e06c090f50..a59a94aa98 100644 --- a/lib/chef/provider/group/dscl.rb +++ b/lib/chef/provider/group/dscl.rb @@ -24,10 +24,9 @@ class Chef def dscl(*args) host = "." stdout_result = ""; stderr_result = ""; cmd = "dscl #{host} -#{args.join(' ')}" - status = popen4(cmd) do |pid, stdin, stdout, stderr| - stdout.each { |line| stdout_result << line } - stderr.each { |line| stderr_result << line } - end + status = shell_out(cmd) + status.stdout.each_line { |line| stdout_result << line } + status.stderr.each_line { |line| stderr_result << line } return [cmd, status, stdout_result, stderr_result] end |