 (defn repl-main-opt [repl-env-fn args cfg]
   (let [target-on-classpath?
         (when-let [target-dir
-                   (try (:target-dir (read-string (slurp "figwheel-main.edn")) "target")
-                        (catch Throwable t
-                          nil))]
+                   (:target-dir
+                    (try (read-string (slurp "figwheel-main.edn"))
+                         (catch Throwable t
+                           nil))
+                    "target")]
           (fw-util/dir-on-classpath? target-dir))
         temp-dir (when-not target-on-classpath?
                    (let [tempf (java.io.File/createTempFile "figwheel" "repl")]

          {:group :cljs.cli/compile :fn watch-opt
           :arg "path"
           :doc "Continuously build, only effective with the --compile main option"}
          ["-fw" "--figwheel"]
          {:group :cljs.cli/compile :fn figwheel-opt
           :arg "bool"

    (cond-> main-edn
      handler (assoc :ring-handler handler))))



;; use tools reader read-string for better error messages
#_(redn/read-string)
(defn fetch-figwheel-main-edn [cfg]
  (read-edn-file "figwheel-main.edn"))

(defn- config-figwheel-main-edn [cfg]
  (if-not (.isFile (io/file "figwheel-main.edn"))
    cfg
    (let [config-edn (or (::start-figwheel-options cfg)
                         (process-figwheel-main-edn
                          (fetch-figwheel-main-edn cfg)))]
      (-> cfg
          (update ::config #(merge config-edn %))))))

(defn- config-merge-current-build-conf [{:keys [::extra-config ::build] :as cfg}]
  (update cfg
