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
path: root/app
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2016-03-25 16:19:20 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2016-03-25 16:19:20 +0300
commited8e1faa4c72e138f3a75139fa216873a8b67850 (patch)
treefdc42c49200f5608acf5eb117fa169230c9af393 /app
parent9e7e2c6b9d2e46720c0375b6c44a2fb5e0f7acbe (diff)
Make sure Repository#gitlab_ci_yml is safe to use even when repository is missing
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app')
-rw-r--r--app/models/repository.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/repository.rb b/app/models/repository.rb
index e36c6ab0f0a..0a9cc364b77 100644
--- a/app/models/repository.rb
+++ b/app/models/repository.rb
@@ -468,7 +468,7 @@ class Repository
end
def gitlab_ci_yml
- return nil if empty?
+ return nil if !exists? || empty?
@gitlab_ci_yml ||= tree(:head).blobs.find do |file|
file.name == '.gitlab-ci.yml'