lib/scan/runner.rb in scan-0.9.0 vs lib/scan/runner.rb in scan-0.10.0

- old
+ new

@@ -52,11 +52,12 @@ output_file = Tempfile.new("junit_report") report_collector = ReportCollector.new(Scan.config[:open_report], Scan.config[:output_types], Scan.config[:output_directory], - Scan.config[:use_clang_report_name]) + Scan.config[:use_clang_report_name], + Scan.config[:custom_report_file_name]) cmd = report_collector.generate_commands(TestCommandGenerator.xcodebuild_log_path, types: 'junit', output_file_name: output_file.path).values.last system(cmd) @@ -89,10 +90,18 @@ return unless ENV['FASTLANE_EXPLICIT_OPEN_SIMULATOR'] UI.message("Killing all running simulators") `killall Simulator &> /dev/null` - UI.message("Explicitly opening simulator for device: #{device.name}") - `open -a Simulator --args -CurrentDeviceUDID #{device.udid}` + # As a second level of feature switching, see if we want to try the xcode-select variant + if ENV['FASTLANE_EXPLICIT_OPEN_SIMULATOR'] == '2' + simulator_path = File.join(FastlaneCore::Helper.xcode_path, 'Applications', 'Simulator.app') + UI.message("Explicitly opening simulator at #{simulator_path} for device: #{device.name}") + else + simulator_path = 'Simulator' + UI.message("Explicitly opening simulator for device: #{device.name}") + end + + `open -a #{simulator_path} --args -CurrentDeviceUDID #{device.udid}` end end end