fix failure in case of missing options

This commit is contained in:
Markus Doits 2018-11-05 19:18:16 +01:00
parent 024523a3b5
commit 65e2731f83
No known key found for this signature in database
GPG key ID: A0796D16BD3D3DAE

View file

@ -900,7 +900,7 @@ module Ci
# sure that the format is always correct when accessing the retry options, # sure that the format is always correct when accessing the retry options,
# even on old builds. # even on old builds.
def normalized_retry def normalized_retry
value = options[:retry] value = options&.dig(:retry)
value.is_a?(Integer) ? { max: value } : value.to_h value.is_a?(Integer) ? { max: value } : value.to_h
end end