From e71666241433a48aff961e93ea781d5ed890dd2d Mon Sep 17 00:00:00 2001 From: Tim Smith Date: Mon, 5 Dec 2016 11:46:32 -0800 Subject: The suggested fix for the manage_home deprecation is incorrect manage_home: true is not a proper resource property. It should be manage_home true instead. Signed-off-by: Tim Smith --- lib/chef/resource/user.rb | 4 ++-- spec/unit/provider/user/linux_spec.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/chef/resource/user.rb b/lib/chef/resource/user.rb index 19a4e2faf5..fc7720bc25 100644 --- a/lib/chef/resource/user.rb +++ b/lib/chef/resource/user.rb @@ -158,10 +158,10 @@ class Chef def supports(args = {}) if args.key?(:manage_home) - Chef.deprecated(:supports_property, "supports { manage_home: #{args[:manage_home]} } on the user resource is deprecated and will be removed in Chef 13, set manage_home: #{args[:manage_home]} instead") + Chef.deprecated(:supports_property, "supports { manage_home: #{args[:manage_home]} } on the user resource is deprecated and will be removed in Chef 13, set manage_home #{args[:manage_home]} instead") end if args.key?(:non_unique) - Chef.deprecated(:supports_property, "supports { non_unique: #{args[:non_unique]} } on the user resource is deprecated and will be removed in Chef 13, set non_unique: #{args[:non_unique]} instead") + Chef.deprecated(:supports_property, "supports { non_unique: #{args[:non_unique]} } on the user resource is deprecated and will be removed in Chef 13, set non_unique #{args[:non_unique]} instead") end super end diff --git a/spec/unit/provider/user/linux_spec.rb b/spec/unit/provider/user/linux_spec.rb index 819dc5e0fe..ca62f2b150 100644 --- a/spec/unit/provider/user/linux_spec.rb +++ b/spec/unit/provider/user/linux_spec.rb @@ -69,7 +69,7 @@ describe Chef::Provider::User::Linux do it "throws a deprecation warning on setting supports[:manage_home]" do Chef::Config[:treat_deprecation_warnings_as_errors] = false - expect(Chef).to receive(:deprecated).with(:supports_property, "supports { manage_home: true } on the user resource is deprecated and will be removed in Chef 13, set manage_home: true instead") + expect(Chef).to receive(:deprecated).with(:supports_property, "supports { manage_home: true } on the user resource is deprecated and will be removed in Chef 13, set manage_home true instead") @new_resource.supports( { :manage_home => true } ) end -- cgit v1.2.1