Fix related to new profile id generation for fetching dependencies in dsl logic

Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
This commit is contained in:
Nikita Mathur 2022-06-08 19:47:20 +05:30 committed by Clinton Wolfe
parent e9e830d3d4
commit b86ed1343d

View file

@ -90,13 +90,13 @@ module Inspec::DSL
if profile_version
profile_id = "#{profile_id}-#{profile_version}"
else
profile_id_key = nil
new_profile_id = nil
dependencies.list.keys.each do |key|
profile_id_key = key.split("-")
profile_id_key.pop
profile_id_key = key if profile_id_key.join("-") == profile_id
new_profile_id = key if profile_id_key.join("-") == profile_id
end
profile_id = profile_id_key
profile_id = new_profile_id
end
dep_entry = dependencies.list[profile_id]