mirror of
https://github.com/inspec/inspec
synced 2024-11-27 15:10:44 +00:00
This function was only returning boolean if profile_config_exist and was returning nil if condition was failed so updated the method to return false
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
This commit is contained in:
parent
12bd7a2c48
commit
3725aa4598
1 changed files with 1 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue