summaryrefslogtreecommitdiff
path: root/lib/chef/resource/file/verification.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/resource/file/verification.rb')
-rw-r--r--lib/chef/resource/file/verification.rb10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/chef/resource/file/verification.rb b/lib/chef/resource/file/verification.rb
index cf5585e5cf..3400684bc5 100644
--- a/lib/chef/resource/file/verification.rb
+++ b/lib/chef/resource/file/verification.rb
@@ -108,10 +108,12 @@ 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.deprecated(:verify_file,
- "%{file} is deprecated in verify command and will not be "\
- "supported in Chef 13. Please use %{path} instead."
- ) if @command.include?("%{file}")
+ if @command.include?("%{file}")
+ Chef.deprecated(:verify_file,
+ "%{file} is deprecated in verify command and will not be "\
+ "supported in Chef 13. Please use %{path} instead."
+ )
+ end
command = @command % { :file => path, :path => path }
interpreter = Chef::GuardInterpreter.for_resource(@parent_resource, command, @command_opts)
interpreter.evaluate