Skip to content

Commit

Permalink
Update csv.rb
Browse files Browse the repository at this point in the history
Changed to detect if it is an array, rather than checking if it is a string.
rscrappy committed Aug 9, 2021
1 parent 61818d5 commit e4fc326
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/inspec_tools/csv.rb
Original file line number Diff line number Diff line change
@@ -74,10 +74,10 @@ def parse_controls(prefix)
control['tags']['nist'] = nist unless nist.nil? || nist.include?(nil)
@mapping['control.tags'].each do |tag|
if tag.first == 'cci'
if cci_number.is_a? String
control['tags'][tag.first] = [cci_number]
else
if cci_number.is_a? Array
control['tags'][tag.first] = cci_number
else
control['tags'][tag.first] = [cci_number]
end
next
end

0 comments on commit e4fc326

Please sign in to comment.