Skip to content

Commit

Permalink
Remove 'nil' from array before returning (fastlane#21772)
Browse files Browse the repository at this point in the history
Fixes fastlane#21768 when there is no device match for a given name.
  • Loading branch information
arc-v2 authored and SubhrajyotiSen committed Jan 17, 2024
1 parent 26a4a44 commit ee0023d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scan/lib/scan/detect_values.rb
Expand Up @@ -217,7 +217,7 @@ def self.detect_simulator(devices, requested_os_type, deployment_target_key, def
if pieces.count == 0
[] # empty array
elsif pieces.count == 1
[ highest_compatible_simulator(simulators, pieces.first) ]
[ highest_compatible_simulator(simulators, pieces.first) ].compact
else # pieces.count == 2 -- mathematically, because of the 'end of line' part of our regular expression
version = pieces[1].tr('()', '')
display_device = "'#{pieces[0]}' with version #{version}"
Expand Down

0 comments on commit ee0023d

Please sign in to comment.