diff options
author | Tim Smith <tsmith@chef.io> | 2018-10-27 18:25:06 -0700 |
---|---|---|
committer | Tim Smith <tsmith@chef.io> | 2018-10-31 12:37:08 -0700 |
commit | 9e7ccaf5989f4dbc646261941683c985e75dd9ce (patch) | |
tree | 4a81e159f5ed385f59e628ed69969d336bfa4faa | |
parent | 43d7fc55b6014937102f2d0ac14e2bdd0663d8e4 (diff) | |
download | chef-9e7ccaf5989f4dbc646261941683c985e75dd9ce.tar.gz |
Fix dmg_name to actually work the way it was meant to
We created a variable with the same name as the property and this probably did the right thing in Chef 11, but what we really want is dmg_name to take on the app name by default. Now it does.
Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r-- | lib/chef/resource/dmg_package.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/chef/resource/dmg_package.rb b/lib/chef/resource/dmg_package.rb index 0c8c5da128..8a1a89562a 100644 --- a/lib/chef/resource/dmg_package.rb +++ b/lib/chef/resource/dmg_package.rb @@ -50,7 +50,9 @@ class Chef description: "The Directory under /Volumes where the dmg is mounted as not all dmgs are mounted into a /Volumes location matching the name of the dmg." property :dmg_name, String, - description: "The name of the dmg if it is not the same as app, or if the name has spaces." + description: "The name of the dmg if it is not the same as app, or if the name has spaces.", + desired_state: false, + default: lazy { |r| r.app } property :type, String, description: "The type of package.", @@ -91,7 +93,6 @@ class Chef if current_resource.nil? volumes_dir = new_resource.volumes_dir ? new_resource.volumes_dir : new_resource.app - dmg_name = new_resource.dmg_name ? new_resource.dmg_name : new_resource.app if new_resource.source remote_file dmg_file do |