Commit 0a4db90d authored by Jacob Vosmaer's avatar Jacob Vosmaer

Use begin/end instead of defined?

parent c76e6b98
...@@ -205,11 +205,11 @@ module Ci ...@@ -205,11 +205,11 @@ module Ci
end end
def ci_yaml_file def ci_yaml_file
return @ci_yaml_file if defined?(@ci_yaml_file) @ci_yaml_file ||= begin
blob = project.repository.blob_at(sha, '.gitlab-ci.yml')
blob = project.repository.blob_at(sha, '.gitlab-ci.yml') blob.load_all_data!(project.repository)
blob.load_all_data!(project.repository) blob.data
@ci_yaml_file = blob.data end
rescue rescue
nil nil
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment