Skip to content

Commit db83b52

Browse files
author
dnolen
committed
less cryptic error if :main doesn't correspond to any file
1 parent 70a4313 commit db83b52

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/main/clojure/cljs/closure.clj

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1893,7 +1893,10 @@
18931893
(let [one-file? (and (:main all-opts)
18941894
(#{:advanced :simple} (:optimizations all-opts)))
18951895
source (if one-file?
1896-
(:uri (cljs-source-for-namespace (:main all-opts)))
1896+
(let [main (:main all-opts)
1897+
uri (:uri (cljs-source-for-namespace main))]
1898+
(assert uri (str "No file for namespace " main " exists"))
1899+
uri)
18971900
source)
18981901
compile-opts (if one-file?
18991902
(assoc all-opts :output-file (:output-to all-opts))

0 commit comments

Comments
 (0)