summaryrefslogtreecommitdiff
path: root/lib/chef/resource/file
diff options
context:
space:
mode:
authorThom May <thom@chef.io>2017-03-08 11:54:58 +0000
committerThom May <thom@chef.io>2017-03-08 11:54:58 +0000
commit328ca3bc97496282d988c98446882601cfdfc554 (patch)
tree548f839bea45b997668f88c0f0be89906261ea1d /lib/chef/resource/file
parent33a2b809ba7dd22ff1d269fcd8bdfc5b78827a0c (diff)
downloadchef-328ca3bc97496282d988c98446882601cfdfc554.tar.gz
Remove %{file} from verify interpolationtm/remove_path_validation_var
Signed-off-by: Thom May <thom@chef.io>
Diffstat (limited to 'lib/chef/resource/file')
-rw-r--r--lib/chef/resource/file/verification.rb9
1 files changed, 2 insertions, 7 deletions
diff --git a/lib/chef/resource/file/verification.rb b/lib/chef/resource/file/verification.rb
index 3400684bc5..079e6dc201 100644
--- a/lib/chef/resource/file/verification.rb
+++ b/lib/chef/resource/file/verification.rb
@@ -106,15 +106,10 @@ class Chef
# We reuse Chef::GuardInterpreter in order to support
# the same set of options that the not_if/only_if blocks do
def verify_command(path, opts)
- # First implementation interpolated `file`; docs & RFC claim `path`
- # is interpolated. Until `file` can be deprecated, interpolate both.
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."
- )
+ raise ArgumentError, "The %{file} expansion for verify commands has been removed. Please use %{path} instead."
end
- command = @command % { :file => path, :path => path }
+ command = @command % { :path => path }
interpreter = Chef::GuardInterpreter.for_resource(@parent_resource, command, @command_opts)
interpreter.evaluate
end