mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 14:47:19 -04:00
Merge pull request #1256 from colinsurprenant/LOGSTASH-2024
fix for undefined method + for nil:NilClass for invalid paramters
This commit is contained in:
commit
0b41e9d247
1 changed files with 4 additions and 2 deletions
|
@ -86,15 +86,17 @@ class LogStash::Agent < Clamp::Command
|
||||||
configure
|
configure
|
||||||
|
|
||||||
# You must specify a config_string or config_path
|
# You must specify a config_string or config_path
|
||||||
if config_string.nil? && config_path.nil?
|
if @config_string.nil? && @config_path.nil?
|
||||||
fail(help + "\n" + I18n.t("logstash.agent.missing-configuration"))
|
fail(help + "\n" + I18n.t("logstash.agent.missing-configuration"))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@config_string = @config_string.to_s
|
||||||
|
|
||||||
if @config_path
|
if @config_path
|
||||||
# Append the config string.
|
# Append the config string.
|
||||||
# This allows users to provide both -f and -e flags. The combination
|
# This allows users to provide both -f and -e flags. The combination
|
||||||
# is rare, but useful for debugging.
|
# is rare, but useful for debugging.
|
||||||
@config_string = config_string + load_config(@config_path)
|
@config_string = @config_string + load_config(@config_path)
|
||||||
else
|
else
|
||||||
# include a default stdin input if no inputs given
|
# include a default stdin input if no inputs given
|
||||||
if @config_string !~ /input *{/
|
if @config_string !~ /input *{/
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue