      (loop [build start-build]
        (cljs-repl (:id build))
        (let [chosen-build-id (get-build-choice
-                              (keep :id (filter config/optimizations-none? all-builds)))
-             chosen-build (first (filter #(= (name (:id %)) chosen-build-id) all-builds))]
-         (recur chosen-build))))))
+                              (keep :id (filter config/optimizations-none? all-builds)))]
+         (if (false? chosen-build-id)
+           false ;; quit
+           (let [chosen-build (first (filter #(= (name (:id %)) chosen-build-id) all-builds))]
+             (recur chosen-build))))))))
 
 (defn start-nrepl-server [figwheel-options autobuild-options]
   (when (:nrepl-port figwheel-options)

      (print (str "Choose focus build for CLJS REPL (" (clojure.string/join ", " choices) ") > "))
      (flush)
      (let [res (read-line)]
        (if (choices res)
          res
          (do
            (println (str "Error: " res " is not a valid choice"))
            (recur)))))))

        (recur)))))

(defn add-repl-print-callback! [{:keys [browser-callbacks]}]
  (let [pr-fn (resolve-repl-println)]
    (swap! browser-callbacks assoc "figwheel-repl-print"
           (fn [args] (apply pr-fn args)))))

