mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 06:37:19 -04:00
- fix inspection of value when reporting validation failure of boolean
This commit is contained in:
parent
5399ea9770
commit
ced0b8f442
1 changed files with 2 additions and 1 deletions
|
@ -242,8 +242,9 @@ module LogStash::Config::Mixin
|
|||
end
|
||||
|
||||
if value.first !~ /^(true|false)$/
|
||||
return false, "Expected boolean 'true' or 'false', got #{value.inspect}"
|
||||
return false, "Expected boolean 'true' or 'false', got #{value.first.inspect}"
|
||||
end
|
||||
|
||||
result = (value.first == "true")
|
||||
when :ipaddr
|
||||
if value.size > 1 # only one value wanted
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue