From 45aa3fcfe8a04b0f46d9d7d67a6fc617277a103a Mon Sep 17 00:00:00 2001 From: Anthony D'Ambrosio Date: Tue, 23 Feb 2016 14:17:45 -0800 Subject: [PATCH] Restored monitor-keystrokes back to use `(.read System/in)`. Removed `:with-repl` from opts before additional parsing. --- test-refresh/src/com/jakemccrary/test_refresh.clj | 8 ++++---- test-refresh/src/leiningen/test_refresh.clj | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/test-refresh/src/com/jakemccrary/test_refresh.clj b/test-refresh/src/com/jakemccrary/test_refresh.clj index d518a3f..9b5c7fe 100644 --- a/test-refresh/src/com/jakemccrary/test_refresh.clj +++ b/test-refresh/src/com/jakemccrary/test_refresh.clj @@ -179,11 +179,11 @@ (read-string line) (do (run-test-refresh!) :run-tests)) (System/exit 0)))) - (loop [line (read-line)] - (if-not line + (loop [c (.read System/in)] + (if (= c -1) (System/exit 0) - (run-test-refresh!)) - (recur (read-line))))))) + (do (run-test-refresh!) + (recur (.read System/in))))))))) (defn- create-user-notifier [notify-command] (let [notify-command (if (string? notify-command) diff --git a/test-refresh/src/leiningen/test_refresh.clj b/test-refresh/src/leiningen/test_refresh.clj index 025f3df..cd40b97 100644 --- a/test-refresh/src/leiningen/test_refresh.clj +++ b/test-refresh/src/leiningen/test_refresh.clj @@ -21,6 +21,7 @@ with-repl? (or (some #{:with-repl ":with-repl" "with-repl"} args) with-repl) args (remove #{:growl ":growl" "growl" :changes-only ":changes-only" "changes-only" + :with-repl ":with-repl" "with-repl" :run-once ":run-once" "run-once"} args) notify-on-success (or (nil? notify-on-success) notify-on-success) selectors (filter keyword? args)]