This is an automated email from the ASF dual-hosted git repository.
aradzinski pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nlpcraft.git
The following commit(s) were added to refs/heads/master by this push:
new 4f55f19 Update NCCli.scala
4f55f19 is described below
commit 4f55f19ffccdf640f993d0e98839d26d5f3dbc26
Author: Aaron Radzinski <[email protected]>
AuthorDate: Fri Nov 20 19:12:18 2020 -0800
Update NCCli.scala
---
.../main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCli.scala | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git
a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCli.scala
b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCli.scala
index 0b0cae2..c757ca3 100644
---
a/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCli.scala
+++
b/nlpcraft/src/main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCli.scala
@@ -3477,12 +3477,15 @@ object NCCli extends App {
@throws[Exception]
private def doCommand(args: Seq[String], repl: Boolean): Unit = {
if (args.nonEmpty) {
- if (args.head.head == '$')
+ if (args.head.head == '$') {
+ val head = args.head.trim
+ val tail = args.tail.toList
try
- execOsCmd(args.head.tail.trim() :: args.tail.toList) //
Remove '$' from 1st argument.
+ execOsCmd(if (head.isEmpty) tail else head :: tail) //
Remove '$' from 1st argument.
catch {
case e: Exception ⇒ error(e.getLocalizedMessage)
}
+ }
else {
// Process 'no-ansi' and 'ansi' commands first.
processAnsi(args, repl)