diff --git a/lib/buildkite/test_collector/minitest_plugin/reporter.rb b/lib/buildkite/test_collector/minitest_plugin/reporter.rb index 49463ad..e6ac263 100644 --- a/lib/buildkite/test_collector/minitest_plugin/reporter.rb +++ b/lib/buildkite/test_collector/minitest_plugin/reporter.rb @@ -11,8 +11,10 @@ def initialize(io, options) def record(result) super - if trace = Buildkite::TestCollector.uploader.traces[result.source_location] - Buildkite::TestCollector.session&.write_result(trace) + if Buildkite::TestCollector.uploader + if trace = Buildkite::TestCollector.uploader.traces[result.source_location] + Buildkite::TestCollector.session&.write_result(trace) + end end end