From b86ed1343df1370ea7db4c4ab23b2c17c186985e Mon Sep 17 00:00:00 2001 From: Nikita Mathur Date: Wed, 8 Jun 2022 19:47:20 +0530 Subject: [PATCH] Fix related to new profile id generation for fetching dependencies in dsl logic Signed-off-by: Nikita Mathur --- lib/inspec/dsl.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/inspec/dsl.rb b/lib/inspec/dsl.rb index be25e4b37..fc3d00f03 100644 --- a/lib/inspec/dsl.rb +++ b/lib/inspec/dsl.rb @@ -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]