This is an automated email from the ASF dual-hosted git repository.
aradzinski pushed a commit to branch NLPCRAFT-108
in repository https://gitbox.apache.org/repos/asf/incubator-nlpcraft.git
The following commit(s) were added to refs/heads/NLPCRAFT-108 by this push:
new 9fb8af4 Update NCCli.scala
9fb8af4 is described below
commit 9fb8af4079160c715abcb714c6f7b9470045d12f
Author: Aaron Radzinski <[email protected]>
AuthorDate: Thu Oct 1 22:41:53 2020 -0700
Update NCCli.scala
---
.../main/scala/org/apache/nlpcraft/model/tools/cmdline/NCCli.scala | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
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 9250dd6..ad55edb 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
@@ -62,6 +62,7 @@ object NCCli extends App {
private final lazy val JAVA_CP =
U.sysEnv("NLPCRAFT_CLI_JAVA_CP").getOrElse(ManagementFactory.getRuntimeMXBean.getClassPath)
private final lazy val SCRIPT_NAME =
U.sysEnv("NLPCRAFT_CLI_SCRIPT").getOrElse(s"nlpcraft.${if
(SystemUtils.IS_OS_UNIX) "sh" else "cmd"}")
private final lazy val PROMPT = if (SCRIPT_NAME.endsWith("cmd")) ">" else
"$"
+ private final lazy val IS_SCRIPT = U.sysEnv("NLPCRAFT_CLI").isDefined
private final val T___ = " "
private val OPEN_BRK = Seq('[', '{', '(', '<')
@@ -532,7 +533,7 @@ object NCCli extends App {
System.out,
ansiCyanFg,
// ANSI is NOT disabled & we ARE NOT running from IDEA or Eclipse...
- NCAnsi.isEnabled && U.sysEnv("NLPCRAFT_CLI").isDefined
+ NCAnsi.isEnabled && IS_SCRIPT
)
/**
@@ -1156,6 +1157,9 @@ object NCCli extends App {
else
doCommand(args.toSeq, repl = false)
+ if (IS_SCRIPT)
+ logln()
+
sys.exit(exitStatus)
}