From 0452dd79009dd074293e75c5f1f60e46527b53e6 Mon Sep 17 00:00:00 2001 From: Caleb Spare Date: Tue, 18 Apr 2017 16:23:57 -0700 Subject: [PATCH] Make javac respect LEIN_SILENT. --- src/leiningen/compile.clj | 2 +- src/leiningen/javac.clj | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/leiningen/compile.clj b/src/leiningen/compile.clj index c059445a..7dbaab6a 100644 --- a/src/leiningen/compile.clj +++ b/src/leiningen/compile.clj @@ -151,7 +151,7 @@ Code that should run on startup belongs in a -main defn." form `(do ~set-agent-threadpool-form (doseq [~ns-sym '~namespaces] - ~(if main/*info* + ~(when main/*info* `(binding [*out* *err*] (println "Compiling" ~ns-sym))) (try diff --git a/src/leiningen/javac.clj b/src/leiningen/javac.clj index bc4169ba..ac7d3ee7 100644 --- a/src/leiningen/javac.clj +++ b/src/leiningen/javac.clj @@ -88,8 +88,9 @@ (java.lang.System/exit 1))] (if-let [compiler# (javax.tools.ToolProvider/getSystemJavaCompiler)] (do - (binding [*out* *err*] - (println "Compiling" ~(count files) "source files to" ~compile-path)) + ~(when main/*info* + `(binding [*out* *err*] + (println "Compiling" ~(count files) "source files to" ~compile-path))) (.mkdirs (clojure.java.io/file ~compile-path)) (when-not (zero? (.run compiler# nil nil nil