Skip to content

Commit f475126

Browse files
committed
CLJS-2603: Shared AOT cache: Failure if home directory not writable
1 parent ace7e1f commit f475126

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/clojure/cljs/closure.clj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -601,7 +601,8 @@
601601
(when (or (nil? out-file)
602602
(comp/requires-compilation? jar-file out-file opts))
603603
;; actually compile from JAR
604-
(if-not (:aot-cache opts)
604+
(if (or (not (:aot-cache opts))
605+
(not (.canWrite (io/file (System/getProperty "user.home")))))
605606
(-compile (jar-file-to-disk jar-file (util/output-directory opts) opts) opts)
606607
(let [cache-path (ana/cache-base-path (util/path jar-file) opts)]
607608
(when-not (.exists (:output-file cacheable))

0 commit comments

Comments
 (0)