mirror of
https://github.com/inspec/inspec
synced 2024-11-15 09:27:20 +00:00
bugfix: rescue url error in url target helper
This commit is contained in:
parent
6c1b9fff9d
commit
2cb3d6f90f
1 changed files with 2 additions and 0 deletions
|
@ -13,6 +13,8 @@ module Inspec::Targets
|
|||
uri = URI.parse(target)
|
||||
return false if uri.nil? or uri.scheme.nil?
|
||||
%{ http https }.include? uri.scheme
|
||||
rescue URI::Error => e
|
||||
false
|
||||
end
|
||||
|
||||
def resolve(target, opts = {})
|
||||
|
|
Loading…
Reference in a new issue