From b94a3264301da4b2af002bd9122c4905bd779622 Mon Sep 17 00:00:00 2001 From: dcereijodo Date: Mon, 16 Sep 2019 15:07:57 +0200 Subject: [PATCH] stop the flow and exit when arguments are passed --- src/main/scala/com/pagantis/singer/flows/BatchHttp.scala | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/scala/com/pagantis/singer/flows/BatchHttp.scala b/src/main/scala/com/pagantis/singer/flows/BatchHttp.scala index 69fc6be..486dcd8 100644 --- a/src/main/scala/com/pagantis/singer/flows/BatchHttp.scala +++ b/src/main/scala/com/pagantis/singer/flows/BatchHttp.scala @@ -15,8 +15,11 @@ object BatchHttp extends App { val clazz = getClass.getName + if(args.length > 0) { + println("Reading from file not yet supported, try 'cat your-file > batch-http'") + sys.exit(1) + } val inputStream = System.in - if(inputStream.available() == 0) sys.exit(1) // init actor system, loggers and execution context implicit val system: ActorSystem = ActorSystem("BatchHttp")