diff options
author | Tomasz Maczukin <tomasz@maczukin.pl> | 2018-06-21 14:17:35 +0300 |
---|---|---|
committer | Tomasz Maczukin <tomasz@maczukin.pl> | 2018-06-25 15:48:34 +0300 |
commit | 156339569d52bef66fe41c85d29ab3c9865f7362 (patch) | |
tree | 191eab86b95578348e6d0348ada442fdab4796a8 /lib/gitlab/ci/variables | |
parent | 60f51cd20af5db8759c31c32a9c45db5b5be2199 (diff) |
Enforce setting string as value of the CI/CD variable
Diffstat (limited to 'lib/gitlab/ci/variables')
-rw-r--r-- | lib/gitlab/ci/variables/collection/item.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/gitlab/ci/variables/collection/item.rb b/lib/gitlab/ci/variables/collection/item.rb index d00e5b07f95..222aa06b800 100644 --- a/lib/gitlab/ci/variables/collection/item.rb +++ b/lib/gitlab/ci/variables/collection/item.rb @@ -4,6 +4,9 @@ module Gitlab class Collection class Item def initialize(key:, value:, public: true, file: false) + raise ArgumentError, "`value` must be of type String, while it was: #{value.class}" unless + value.is_a?(String) || value.nil? + @variable = { key: key, value: value, public: public, file: file } |