Skip to content

Commit ae3fd8a

Browse files
committed
chore: Rubocop guard clause
1 parent 7d90707 commit ae3fd8a

File tree

1 file changed

+3
-3
lines changed
  • instrumentation/rake/lib/opentelemetry/instrumentation/rake/patches

1 file changed

+3
-3
lines changed

instrumentation/rake/lib/opentelemetry/instrumentation/rake/patches/task.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ def tracer
3131
def force_flush
3232
top_level_task_names = ::Rake.application.top_level_tasks.map { |t| t.split('[').first }
3333

34-
if top_level_task_names.include?(name)
35-
OpenTelemetry.tracer_provider.force_flush
36-
end
34+
return unless top_level_task_names.include?(name)
35+
36+
OpenTelemetry.tracer_provider.force_flush
3737
end
3838
end
3939
end

0 commit comments

Comments
 (0)