diff --git a/src/main/clojure/cljs/build/api.clj b/src/main/clojure/cljs/build/api.clj index d8cbd99667..efb0de14bd 100644 --- a/src/main/clojure/cljs/build/api.clj +++ b/src/main/clojure/cljs/build/api.clj @@ -204,8 +204,8 @@ (env/default-compiler-env opts)))) ([source opts compiler-env] (doseq [[unknown-opt suggested-opt] (util/unknown-opts (set (keys opts)) closure/known-opts)] - (println (str "WARNING: Unknown compiler option '" unknown-opt "'." - (when suggested-opt (str " Did you mean '" suggested-opt "'?"))))) + (when suggested-opt + (println (str "WARNING: Unknown compiler option '" unknown-opt "'. Did you mean '" suggested-opt "'?")))) (binding [ana/*cljs-warning-handlers* (:warning-handlers opts ana/*cljs-warning-handlers*)] (closure/build source opts compiler-env)))) diff --git a/src/main/clojure/cljs/repl.cljc b/src/main/clojure/cljs/repl.cljc index ee8dca22f1..ecffd9abfe 100644 --- a/src/main/clojure/cljs/repl.cljc +++ b/src/main/clojure/cljs/repl.cljc @@ -780,8 +780,8 @@ bind-err true} :as opts}] (doseq [[unknown-opt suggested-opt] (util/unknown-opts (set (keys opts)) (set/union known-repl-opts cljsc/known-opts))] - (println (str "WARNING: Unknown option '" unknown-opt "'." - (when suggested-opt (str " Did you mean '" suggested-opt "'?"))))) + (when suggested-opt + (println (str "WARNING: Unknown option '" unknown-opt "'. Did you mean '" suggested-opt "'?")))) (let [repl-opts (-repl-options repl-env) repl-requires (into repl-requires (:repl-requires repl-opts)) {:keys [analyze-path repl-verbose warn-on-undeclared special-fns static-fns] :as opts