summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2016-12-08 11:59:58 -0800
committerGitHub <noreply@github.com>2016-12-08 11:59:58 -0800
commit2250307b6dfbd125cf47b1bc93e3b8ccd85ad27d (patch)
tree27c07d8a8306b2b7d926e455c88e629c06988f62
parente2c5935b818c8d1a74e24ba624de1ae489909fdb (diff)
parent6300a9206d1d6cd354deffd3dbad587db6c35912 (diff)
downloadchef-2250307b6dfbd125cf47b1bc93e3b8ccd85ad27d.tar.gz
Merge pull request #5634 from chef/lcg/better-comment
fix provider_resolver comment to remove FIXME
-rw-r--r--lib/chef/provider_resolver.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/chef/provider_resolver.rb b/lib/chef/provider_resolver.rb
index 8903f65d26..2eb4d72ba5 100644
--- a/lib/chef/provider_resolver.rb
+++ b/lib/chef/provider_resolver.rb
@@ -90,8 +90,10 @@ class Chef
@prioritized_handlers ||= begin
supported_handlers = self.supported_handlers
if supported_handlers.empty?
- # if none of the providers specifically support the resource, we still need to pick one of the providers that are
- # enabled on the node to handle the why-run use case. FIXME we should only do this in why-run mode then.
+ # We always require a provider to be able to call define_resource_requirements on. In the why-run case we need
+ # a provider to say "assuming /etc/init.d/whatever would have been installed" and in the non-why-run case we
+ # need to make a best guess at "cannot find /etc/init.d/whatever". We are essentially defining a "default" provider
+ # for the platform, which is the best we can do, but which might give misleading errors, but we cannot read minds.
Chef::Log.debug "No providers responded true to `supports?` for action #{action} on resource #{resource}, falling back to enabled handlers so we can return something anyway."
supported_handlers = enabled_handlers
end