From b727bedb5589da4011a97e65d6231a399a74f38e Mon Sep 17 00:00:00 2001 From: arc-v2 Date: Thu, 4 Jan 2024 16:55:26 +0530 Subject: [PATCH] Remove 'nil' from array before returning Fixes https://github.com/fastlane/fastlane/issues/21768 when there is no device match for a given name. --- scan/lib/scan/detect_values.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scan/lib/scan/detect_values.rb b/scan/lib/scan/detect_values.rb index 03e64a1f47a..ef539911ec8 100644 --- a/scan/lib/scan/detect_values.rb +++ b/scan/lib/scan/detect_values.rb @@ -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}"