ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anovi...@apache.org
Subject [50/50] incubator-ignite git commit: # ignite-185 Append exit in batch mode.
Date Wed, 04 Mar 2015 03:11:27 GMT
# ignite-185 Append exit in batch mode.


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/38be2cfe
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/38be2cfe
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/38be2cfe

Branch: refs/heads/ignite-185
Commit: 38be2cfedb4c8d686d5fceb2cd4defb422bd047a
Parents: 8b81741
Author: anovikov <anovikov@gridgain.com>
Authored: Wed Mar 4 10:10:17 2015 +0700
Committer: anovikov <anovikov@gridgain.com>
Committed: Wed Mar 4 10:10:17 2015 +0700

----------------------------------------------------------------------
 .../scala/org/apache/ignite/visor/commands/VisorConsole.scala    | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/38be2cfe/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/VisorConsole.scala
----------------------------------------------------------------------
diff --git a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/VisorConsole.scala
b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/VisorConsole.scala
index f9cf931..15900ba 100644
--- a/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/VisorConsole.scala
+++ b/modules/visor-console/src/main/scala/org/apache/ignite/visor/commands/VisorConsole.scala
@@ -135,7 +135,9 @@ object VisorConsole extends App {
     })
 
     batchCommand.foreach(commands => {
-        val input = (if (commands.endsWith(";")) commands else commands + ";").replace(";",
"\n")
+        val ended = if (commands.endsWith(";")) commands else commands + ";"
+
+        val input = (if (ended.endsWith("exit;")) ended else ended + "exit;").replace(";",
"\n")
 
         inputStream = new ByteArrayInputStream(input.getBytes("UTF-8"))
     })


Mime
View raw message