diff options
author | Tim Smith <tsmith@chef.io> | 2016-12-05 11:46:32 -0800 |
---|---|---|
committer | Tim Smith <tsmith@chef.io> | 2016-12-06 09:49:28 -0800 |
commit | e71666241433a48aff961e93ea781d5ed890dd2d (patch) | |
tree | ff82cb77330be4aa8fc6021df4de4410b9803eb5 | |
parent | 8b1600d825a7f9509f9448d0b831b8a07c9aec02 (diff) | |
download | chef-e71666241433a48aff961e93ea781d5ed890dd2d.tar.gz |
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 <tsmith@chef.io>
-rw-r--r-- | lib/chef/resource/user.rb | 4 | ||||
-rw-r--r-- | 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 |