diff options
author | Grzegorz Bizon <grzegorz@gitlab.com> | 2018-11-26 11:53:01 +0000 |
---|---|---|
committer | Grzegorz Bizon <grzegorz@gitlab.com> | 2018-11-26 11:53:01 +0000 |
commit | bf99a58852b10a5593dbb7f9d307bafabb5d3d5f (patch) | |
tree | 0b520fc3a98e96f2439401715bc55f7384966398 /lib | |
parent | 8587e09e17abf5ec9b4d8a7ff471d92e220fabb0 (diff) | |
parent | 56a01151d5c8e85d50069f88c22017ed4c8c06eb (diff) | |
download | gitlab-ce-bf99a58852b10a5593dbb7f9d307bafabb5d3d5f.tar.gz |
Merge branch 'fix-null-variables' into 'master'
Allow to store null variables
Closes #54379
See merge request gitlab-org/gitlab-ce!23299
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/ci/variables/collection/item.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/gitlab/ci/variables/collection/item.rb b/lib/gitlab/ci/variables/collection/item.rb index cf8958e34c2..e3e4e62cc02 100644 --- a/lib/gitlab/ci/variables/collection/item.rb +++ b/lib/gitlab/ci/variables/collection/item.rb @@ -6,8 +6,8 @@ module Gitlab class Collection class Item def initialize(key:, value:, public: true, file: false) - raise ArgumentError, "`#{key}` must be of type String, while it was: #{value.class}" unless - value.is_a?(String) + raise ArgumentError, "`#{key}` must be of type String or nil value, while it was: #{value.class}" unless + value.is_a?(String) || value.nil? @variable = { key: key, value: value, public: public, file: file |