diff options
Diffstat (limited to 'lib/chef/provider/package/macports.rb')
-rw-r--r-- | lib/chef/provider/package/macports.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/chef/provider/package/macports.rb b/lib/chef/provider/package/macports.rb index cd142eca42..b252344c99 100644 --- a/lib/chef/provider/package/macports.rb +++ b/lib/chef/provider/package/macports.rb @@ -3,7 +3,8 @@ class Chef class Package class Macports < Chef::Provider::Package - provides :macports_package, os: "mac_os_x" + provides :macports_package + provides :package, os: "darwin" def load_current_resource @current_resource = Chef::Resource::Package.new(@new_resource.name) @@ -82,12 +83,11 @@ class Chef private def get_response_from_command(command) output = nil - status = popen4(command) do |pid, stdin, stdout, stderr| - begin - output = stdout.read - rescue Exception - raise Chef::Exceptions::Package, "Could not read from STDOUT on command: #{command}" - end + status = shell_out(command) + begin + output = status.stdout + rescue Exception + raise Chef::Exceptions::Package, "Could not read from STDOUT on command: #{command}" end unless status.exitstatus == 0 || status.exitstatus == 1 raise Chef::Exceptions::Package, "#{command} failed - #{status.insect}!" |