summaryrefslogtreecommitdiff
path: root/lib/chef/resource
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2019-10-31 13:58:11 -0700
committerVivek Singh <vivek.singh@msystechnologies.com>2019-12-01 23:34:43 +0530
commit6deede271dd01f0aad393d1264aba45a0a22d6f0 (patch)
tree64696a81934f4ef5845a6ae4206314bf1f62b2bd /lib/chef/resource
parent9009b12f14272522c08b2d19c94ae3e418867f56 (diff)
downloadchef-6deede271dd01f0aad393d1264aba45a0a22d6f0.tar.gz
add output for the file provider verification
closes #4793 Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'lib/chef/resource')
-rw-r--r--lib/chef/resource/file/verification.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/chef/resource/file/verification.rb b/lib/chef/resource/file/verification.rb
index 7cd3144509..59d0981ddc 100644
--- a/lib/chef/resource/file/verification.rb
+++ b/lib/chef/resource/file/verification.rb
@@ -63,6 +63,7 @@ class Chef
class Verification
extend Chef::Mixin::DescendantsTracker
+ attr_reader :output
def self.provides(name)
@provides = name
@@ -117,7 +118,9 @@ class Chef
command = @command % { path: path }
interpreter = Chef::GuardInterpreter.for_resource(@parent_resource, command, @command_opts)
- interpreter.evaluate
+ ret = interpreter.evaluate
+ @output = interpreter.output
+ ret
end
def verify_registered_verification(path, opts)