Merge pull request #449 from chef/dr/check-resolver

bugfix: verify the resolver type first
This commit is contained in:
jcreedcmu 2016-02-11 10:57:05 -05:00
commit 861965a124

View file

@ -35,7 +35,8 @@ module Inspec
# @return [Inspec::Targets::*] the handler for this target
def self.find_handler(target)
resolver = find_resolver(target)
return resolver unless resolver.ancestors.include? DirsResolver
return resolver unless resolver.is_a?(Module) &&
resolver.ancestors.include?(DirsResolver)
resolver.from_target(target).handler
end