bin/receive-events in flapjack-0.7.29 vs bin/receive-events in flapjack-0.7.30

- old
+ new

@@ -139,32 +139,35 @@ config_env = config.all redis_options = config.for_redis if config_env.nil? || config_env.empty? puts "No config data for environment '#{FLAPJACK_ENV}' found in '#{options.config}'" - exit(false) -end - -unless options.source - puts "--source URL is required" + puts "\n#{optparse}" exit 1 end -unless options.follow || options.all - puts "one or both of --follow or --all is required" - exit 1 -end - case ARGV[0] when "help" puts optparse exit else unless ARGV.nil? || ARGV.empty? puts "Unknown command provided: '#{ARGV[0]}'" puts "\n#{optparse}" exit 1 end +end + +unless options.source + puts "--source URL is required" + puts "\n#{optparse}" + exit 1 +end + +unless options.follow || options.all + puts "one or both of --follow or --all is required" + puts "\n#{optparse}" + exit 1 end receive(:follow => options.follow, :all => options.all, :source => options.source,