From e330c30a6d9db16cc65f16164a40cfc96c0f6f7a Mon Sep 17 00:00:00 2001 From: marguerite Date: Tue, 21 Jul 2015 15:36:21 -0400 Subject: Warn about deprecation `%{file}` interpolation in verify command See chef/chef#3232 --- lib/chef/resource/file/verification.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/chef/resource') diff --git a/lib/chef/resource/file/verification.rb b/lib/chef/resource/file/verification.rb index 6be1f912fd..faf4791884 100644 --- a/lib/chef/resource/file/verification.rb +++ b/lib/chef/resource/file/verification.rb @@ -108,6 +108,10 @@ class Chef def verify_command(path, opts) # First implementation interpolated `file`; docs & RFC claim `path` # is interpolated. Until `file` can be deprecated, interpolate both. + Chef::Log.deprecation( + '%{file} is deprecated in verify command and will not be '\ + 'supported in Chef 13. Please use %{path} instead.' + ) if @command.include?('%{file}') command = @command % {:file => path, :path => path} interpreter = Chef::GuardInterpreter.for_resource(@parent_resource, command, @command_opts) interpreter.evaluate -- cgit v1.2.1