Method: Lono::Configset::Combiner#validate_simple!

Defined in:
lib/lono/configset/combiner.rb

#validate_simple!(registry, cs) ⇒ Object



142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
# File 'lib/lono/configset/combiner.rb', line 142

def validate_simple!(registry, cs)
  has_complex_type = cs["default"].detect { |s| !s.is_a?(String) }
  if has_complex_type
    message =<<~EOL
      ERROR: The configset #{registry.name} has a configSets property with a complex type.
      configSets:

          #{cs}

      lono configsets only supports combining configSets with an Array of Strings.
    EOL
    if ENV['LONO_TEST']
      raise message
    else
      puts message.color(:red)
      exit 1
    end
  end
end