summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Roeser <le.petit.fou@web.de>2019-09-13 09:15:37 +0200
committerTobias Roeser <le.petit.fou@web.de>2019-09-13 09:15:37 +0200
commitde22b577cd127d46308f3c826aba19585eaa1eb9 (patch)
tree4fd409671a0486078812b20d9b54ab3be95ed3b9
parentbc71cdb7d3f806ca5eeee2a9782ec6e2e5cf6bff (diff)
downloadmill-de22b577cd127d46308f3c826aba19585eaa1eb9.tar.gz
mill-de22b577cd127d46308f3c826aba19585eaa1eb9.tar.bz2
mill-de22b577cd127d46308f3c826aba19585eaa1eb9.zip
print count of dirs and files when in watch mode
-rw-r--r--main/src/main/MainRunner.scala3
1 files changed, 2 insertions, 1 deletions
diff --git a/main/src/main/MainRunner.scala b/main/src/main/MainRunner.scala
index 7c9d944b..6b091ac7 100644
--- a/main/src/main/MainRunner.scala
+++ b/main/src/main/MainRunner.scala
@@ -35,7 +35,8 @@ class MainRunner(val config: ammonite.main.Cli.Config,
var stateCache = stateCache0
override def watchAndWait(watched: Seq[(os.Path, Long)]) = {
- printInfo(s"Watching for changes to ${watched.length} files... (Ctrl-C to exit)")
+ val dirCount = watched.count(f => os.isDir(f._1))
+ printInfo(s"Watching for changes to ${dirCount} dirs and ${watched.length - dirCount} files... (Ctrl-C to exit)")
def statAll() = watched.forall{ case (file, lastMTime) =>
Interpreter.pathSignature(file) == lastMTime
}