mirror of
https://github.com/inspec/inspec
synced 2025-01-30 13:53:27 +00:00
Merge pull request #449 from chef/dr/check-resolver
bugfix: verify the resolver type first
This commit is contained in:
commit
861965a124
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue