diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2016-12-08 11:26:36 -0800 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2016-12-08 11:26:36 -0800 |
commit | 6300a9206d1d6cd354deffd3dbad587db6c35912 (patch) | |
tree | 27c07d8a8306b2b7d926e455c88e629c06988f62 /lib | |
parent | e2c5935b818c8d1a74e24ba624de1ae489909fdb (diff) | |
download | chef-6300a9206d1d6cd354deffd3dbad587db6c35912.tar.gz |
fix provider_resolver comment to remove FIXME
no, we should not do this only in why-run mode, add more yapping to
make that clear.
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/chef/provider_resolver.rb | 6 |
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 |