summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2021-11-15 22:42:04 -0800
committerLamont Granquist <lamont@scriptkiddie.org>2021-11-15 22:42:04 -0800
commit9924aedacbfb427fcb245c297c33ba51bdbceb8d (patch)
tree7a250fb39bb8f1dbb41b8658fff553b4ba5cbad3 /lib
parent20681f07c993db9add0939513dbc6598bb6c2efd (diff)
downloadchef-9924aedacbfb427fcb245c297c33ba51bdbceb8d.tar.gz
Unit fixes and :all_actions support for DRR fixeslcg/define-resource-requirements-fix
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/chef/mixin/why_run.rb2
-rw-r--r--lib/chef/provider.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/mixin/why_run.rb b/lib/chef/mixin/why_run.rb
index 1954f574d3..357c4a655d 100644
--- a/lib/chef/mixin/why_run.rb
+++ b/lib/chef/mixin/why_run.rb
@@ -309,7 +309,7 @@ class Chef
# "You don't have sufficient privileges to delete #{@new_resource.path}")
# end
def assert(*actions)
- return unless actions.include?(action.to_sym)
+ return unless actions.include?(action.to_sym) || actions.include?(:all_actions)
assertion = Assertion.new
yield assertion
diff --git a/lib/chef/provider.rb b/lib/chef/provider.rb
index 296a22222c..80c58c09ee 100644
--- a/lib/chef/provider.rb
+++ b/lib/chef/provider.rb
@@ -269,7 +269,7 @@ class Chef
end
def requirements
- @requirements ||= ResourceRequirements.new(@new_resource, run_context, action)
+ @requirements ||= ResourceRequirements.new(@new_resource, run_context, action || new_resource.action)
end
def description(description = "NOT_PASSED")