diff options
author | Li Haoyi <haoyi.sg@gmail.com> | 2018-02-20 08:21:01 -0800 |
---|---|---|
committer | Li Haoyi <haoyi.sg@gmail.com> | 2018-02-20 08:21:01 -0800 |
commit | 8f609234d0b48aba9f1e68e068c4ac275dfe3529 (patch) | |
tree | 7be077d0d4b33a0cb6f285ea328eb952c3b626d7 /main/src/mill/Main.scala | |
parent | 41f87cb6df7e8d64bed6c7ae29897cfcf8217fa8 (diff) | |
download | mill-8f609234d0b48aba9f1e68e068c4ac275dfe3529.tar.gz mill-8f609234d0b48aba9f1e68e068c4ac275dfe3529.tar.bz2 mill-8f609234d0b48aba9f1e68e068c4ac275dfe3529.zip |
Properly propagate interactiveness to the server main0
Diffstat (limited to 'main/src/mill/Main.scala')
-rw-r--r-- | main/src/mill/Main.scala | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/main/src/mill/Main.scala b/main/src/mill/Main.scala index a0ef9120..7bc08c61 100644 --- a/main/src/mill/Main.scala +++ b/main/src/mill/Main.scala @@ -9,18 +9,13 @@ import ammonite.util.Util import mill.main.MainRunner object Main { - case class Config(home: ammonite.ops.Path = pwd/'out/'ammonite, - colored: Option[Boolean] = None, - help: Boolean = false, - repl: Boolean = false, - watch: Boolean = false) - def main(args: Array[String]): Unit = { - val (result, _) = main0(args, None, () => false) + val (result, _) = main0(args, None, ammonite.Main.isInteractive(), () => false) System.exit(if(result) 0 else 1) } def main0(args: Array[String], mainRunner: Option[(Cli.Config, MainRunner)], + mainInteractive: Boolean, watchInterrupted: () => Boolean): (Boolean, Option[(Cli.Config, MainRunner)]) = { import ammonite.main.Cli @@ -65,7 +60,7 @@ object Main { ) val runner = new mill.main.MainRunner( - config.copy(home = pwd / "out" / ".ammonite"), + config.copy(home = pwd / "out" / ".ammonite", colored = Some(mainInteractive)), System.out, System.err, System.in, watchInterrupted, mainRunner match{ |