diff --git a/lib/inspec/control_eval_context.rb b/lib/inspec/control_eval_context.rb index 58c408fb6..fd38d7d4f 100644 --- a/lib/inspec/control_eval_context.rb +++ b/lib/inspec/control_eval_context.rb @@ -194,6 +194,7 @@ module Inspec # Check if the given control exist in the --controls option def control_exist_in_controls_list?(id) + id_exist_in_list = false if profile_config_exist? id_exist_in_list = @conf["profile"].include_controls_list.any? do |inclusion| # Try to see if the inclusion is a regex, and if it matches