Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomasz Maczukin <tomasz@maczukin.pl>2016-04-19 16:48:16 +0300
committerTomasz Maczukin <tomasz@maczukin.pl>2016-04-20 12:54:06 +0300
commita84d0204bf754690229cf62ea84f494c037b82a5 (patch)
treec47d2b32deb19e8cbb7c95fb280215e5af810172 /app/models/ci/build.rb
parent4019b0d872bd2b183a06bdc832f5a100c8a88a00 (diff)
Fix Build#append_trace method usage when trace file doesn't exists yet
Diffstat (limited to 'app/models/ci/build.rb')
-rw-r--r--app/models/ci/build.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb
index 9ac6e7e1bfb..d42a65620ff 100644
--- a/app/models/ci/build.rb
+++ b/app/models/ci/build.rb
@@ -253,7 +253,7 @@ module Ci
def append_trace(trace_part, offset)
recreate_trace_dir
- File.truncate(path_to_trace, offset)
+ File.truncate(path_to_trace, offset) if File.exist?(path_to_trace)
File.open(path_to_trace, 'a') do |f|
f.write(trace_part)
end