Update chef-sugar to fix a conflict in Chef 16+
This commit is contained in:
@@ -17,18 +17,4 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
gem_version = run_context.cookbook_collection[cookbook_name].metadata.version
|
||||
|
||||
if Chef::Resource::ChefGem.instance_methods(false).include?(:compile_time)
|
||||
chef_gem 'chef-sugar' do
|
||||
version gem_version
|
||||
compile_time true
|
||||
end
|
||||
else
|
||||
chef_gem 'chef-sugar' do
|
||||
version gem_version
|
||||
action :nothing
|
||||
end.run_action(:install)
|
||||
end
|
||||
|
||||
require 'chef/sugar'
|
||||
Chef::Log.warn('chef-sugar::default no longer needs to be included in your runlist. Instead simply depend on the chef-sugar cookbook and the gem will be installed and loaded automatically.')
|
||||
|
||||
Reference in New Issue
Block a user