From 4f6cb5b916d93d80be4ffe12c1f154d1508caa33 Mon Sep 17 00:00:00 2001 From: Joshua Kaplan Date: Wed, 10 Nov 2021 11:02:17 +0900 Subject: [PATCH] Improve handling for missing coverage info ref: https://github.com/fastlane-community/danger-xcov/issues/25 --- lib/danger_plugin.rb | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/lib/danger_plugin.rb b/lib/danger_plugin.rb index 388db9b..c7e0cf7 100644 --- a/lib/danger_plugin.rb +++ b/lib/danger_plugin.rb @@ -32,12 +32,16 @@ class DangerXcov < Plugin # @return [void] # def report(*args) - # Run xcov to produce a processed report - report = produce_report(*args) - # Output the processed report - output_report(report) + begin + # Run xcov to produce a processed report + report = produce_report(*args) + # Output the processed report + output_report(report) + rescue => e + markdown("Xcov not run due to error: #{e}") + end end - + # Produces and processes a report for use in the report method # It takes the same arguments as report, and returns the same # object as process_report