Skip to content

Commit c6c611e

Browse files
author
Kevin Paulisse
committed
Use concat rather than flatten/compact
1 parent 3a6b10d commit c6c611e

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

lib/octocatalog-diff/catalog.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,11 +192,9 @@ def validate_references
192192
next unless x['parameters'].key?(r)
193193
missing_resources = resources_missing_from_catalog(x['parameters'][r])
194194
next unless missing_resources.any?
195-
missing << missing_resources.map { |missing_target| { source: x, target_type: r, target_value: missing_target } }
195+
missing.concat missing_resources.map { |missing_target| { source: x, target_type: r, target_value: missing_target } }
196196
end
197197
end
198-
missing.flatten!
199-
missing.compact!
200198
return if missing.empty?
201199

202200
# At this point there is at least one broken/missing reference. Format an error message and

0 commit comments

Comments
 (0)