diff options
Diffstat (limited to 'lib/gitlab/ci/trace.rb')
-rw-r--r-- | lib/gitlab/ci/trace.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/gitlab/ci/trace.rb b/lib/gitlab/ci/trace.rb index 6a8f2b9f63b..b17c6ff4488 100644 --- a/lib/gitlab/ci/trace.rb +++ b/lib/gitlab/ci/trace.rb @@ -76,9 +76,9 @@ module Gitlab File.open(ensure_path, "a+b") end - yield stream - - job.touch if job.needs_touch? + yield(stream).tap do + job.touch if job.needs_touch? + end ensure stream&.close end |