summaryrefslogtreecommitdiff
path: root/lib/chef/resource/dmg_package.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/resource/dmg_package.rb')
-rw-r--r--lib/chef/resource/dmg_package.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/chef/resource/dmg_package.rb b/lib/chef/resource/dmg_package.rb
index cb115a235f..07ab920411 100644
--- a/lib/chef/resource/dmg_package.rb
+++ b/lib/chef/resource/dmg_package.rb
@@ -20,6 +20,7 @@ require_relative "../resource"
class Chef
class Resource
class DmgPackage < Chef::Resource
+ unified_mode true
resource_name :dmg_package
provides(:dmg_package) { true }
@@ -129,8 +130,8 @@ class Chef
end
end
- ruby_block "attach #{dmg_file}" do
- block do
+ unless dmg_attached?
+ converge_by "attach #{dmg_file}" do
raise "This DMG package requires EULA acceptance. Add 'accept_eula true' to dmg_package resource to accept the EULA during installation." if software_license_agreement? && !new_resource.accept_eula
attach_cmd = new_resource.accept_eula ? "yes | " : ""
@@ -138,7 +139,6 @@ class Chef
shell_out!(attach_cmd, env: { "PAGER" => "true" })
end
- not_if { dmg_attached? }
end
case new_resource.type