Skip to content

Commit

Permalink
Cope with a nil uploader
Browse files Browse the repository at this point in the history
which can happen if the gem is loaded but hasn't been configured. This has been a problem since 2eb068d
  • Loading branch information
billhorsman committed Dec 13, 2022
1 parent 7d6bbb8 commit e22d682
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/buildkite/test_collector/minitest_plugin/reporter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit e22d682

Please sign in to comment.