diff options
author | Shinya Maeda <shinya@gitlab.com> | 2018-01-25 20:21:31 +0300 |
---|---|---|
committer | Shinya Maeda <shinya@gitlab.com> | 2018-02-06 09:50:08 +0300 |
commit | 002f314f320c5731681297225fff5b528de88ed2 (patch) | |
tree | bc897fd5d1daff9e7a12815151b1a929266db074 /lib/gitlab/ci | |
parent | b9692501060b3543bd3289bd806920044516db8c (diff) |
Expose current_path
Diffstat (limited to 'lib/gitlab/ci')
-rw-r--r-- | lib/gitlab/ci/trace.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/gitlab/ci/trace.rb b/lib/gitlab/ci/trace.rb index 27f5869770e..307e3bf1c8f 100644 --- a/lib/gitlab/ci/trace.rb +++ b/lib/gitlab/ci/trace.rb @@ -101,6 +101,12 @@ module Gitlab job.erase_old_trace! end + def current_path + @current_path ||= paths.find do |trace_path| + File.exist?(trace_path) + end + end + private def ensure_path @@ -116,12 +122,6 @@ module Gitlab end end - def current_path - @current_path ||= paths.find do |trace_path| - File.exist?(trace_path) - end - end - ## # This method doesn't include the latest path, which is JobArtifactUploader#default_path, # Because, in EE, traces can be moved to ObjectStorage, so checking paths in Filestorage doesn't make sense. |