mirror of
https://github.com/inspec/inspec
synced 2024-11-22 12:43:07 +00:00
using fake version 0.0.0 in case no source version available from a dep profile
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
This commit is contained in:
parent
1166489a93
commit
b2e3bb342b
1 changed files with 2 additions and 2 deletions
|
@ -25,7 +25,7 @@ module Inspec
|
|||
def self.from_array(dependencies, cwd, cache, backend)
|
||||
dep_list = {}
|
||||
dependencies.each do |d|
|
||||
key_name = (d.source_version ? "#{d.name}-#{d.source_version}" : d.name) rescue d.name
|
||||
key_name = (d.source_version ? "#{d.name}-#{d.source_version}" : "#{d.name}-0.0.0") rescue "#{d.name}-0.0.0"
|
||||
dep_list[key_name] = d
|
||||
end
|
||||
new(cwd, cache, dep_list, backend)
|
||||
|
@ -40,7 +40,7 @@ module Inspec
|
|||
def self.flatten_dep_tree(dep_tree)
|
||||
dep_list = {}
|
||||
dep_tree.each do |d|
|
||||
key_name = (d.source_version ? "#{d.name}-#{d.source_version}" : d.name) rescue d.name
|
||||
key_name = (d.source_version ? "#{d.name}-#{d.source_version}" : "#{d.name}-0.0.0") rescue "#{d.name}-0.0.0"
|
||||
dep_list[key_name] = d
|
||||
dep_list.merge!(flatten_dep_tree(d.dependencies))
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue