diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-04-15 14:57:22 +0200 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-04-18 13:17:48 +0200 |
commit | 1f3248644ef98879a8a4c31d5be0de9a774cc32a (patch) | |
tree | 77f2a58fc5ccd419b7a471711e5988ea67d8a606 /lib | |
parent | 3dec6e262984faa18b235db4bbd669ccdc80fc3f (diff) | |
download | gitlab-ce-1f3248644ef98879a8a4c31d5be0de9a774cc32a.tar.gz |
Make CI config return empty array if no job variables
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ci/gitlab_ci_yaml_processor.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/ci/gitlab_ci_yaml_processor.rb b/lib/ci/gitlab_ci_yaml_processor.rb index f69b861c989..e152de590de 100644 --- a/lib/ci/gitlab_ci_yaml_processor.rb +++ b/lib/ci/gitlab_ci_yaml_processor.rb @@ -45,8 +45,11 @@ module Ci end def job_variables(name) - job = @jobs[name.to_sym] - job ? job[:variables] : [] + if job = @jobs[name.to_sym] + job[:variables] || [] + else + [] + end end private |