mirror of
https://github.com/inspec/inspec
synced 2024-11-14 00:47:10 +00:00
Fix deep profile chaining (#2121)
Update to fix how multiple relative profile chaining functions. Closes #2120 Signed-off-by: Trevor Vaughan <tvaughan@onyxpoint.com>
This commit is contained in:
parent
8b8d240fe6
commit
fb011c1d10
1 changed files with 12 additions and 1 deletions
|
@ -10,7 +10,18 @@ module Inspec
|
|||
class Requirement
|
||||
def self.from_metadata(dep, cache, opts)
|
||||
raise 'Cannot load empty dependency.' if dep.nil? || dep.empty?
|
||||
new(dep[:name], dep[:version], cache, opts[:cwd], opts.merge(dep))
|
||||
|
||||
req_path = opts[:cwd]
|
||||
|
||||
if dep[:path]
|
||||
req_path = File.expand_path(dep[:path], req_path)
|
||||
end
|
||||
|
||||
new(dep[:name],
|
||||
dep[:version],
|
||||
cache,
|
||||
req_path,
|
||||
opts.merge(dep))
|
||||
end
|
||||
|
||||
def self.from_lock_entry(entry, cwd, cache, backend, opts = {})
|
||||
|
|
Loading…
Reference in a new issue