diff --git a/lib/logstash/kibana.rb b/lib/logstash/kibana.rb index db3f678ef..5722c23fb 100644 --- a/lib/logstash/kibana.rb +++ b/lib/logstash/kibana.rb @@ -80,7 +80,13 @@ module LogStash::Kibana #end end - args = opts.parse(args) + begin + args = opts.parse(args) + rescue SystemExit + # if you ask for --help, optparse will exit. + # capture it and return normally + return [] + end @thread = Thread.new do Cabin::Channel.get.info("Starting web server", :settings => settings) @@ -94,7 +100,7 @@ module LogStash::Kibana public def wait - @thread.join + @thread.join if @thread return 0 end # def wait end