We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4b5d3f0 commit 4472095Copy full SHA for 4472095
src/refactor_nrepl/artifacts.clj
@@ -22,7 +22,9 @@
22
(if (zero? lm) nil lm)))
23
24
;; structure here is {"prismatic/schem" ["0.1.1" "0.2.0" ...]}
25
-(defonce artifacts (atom (slurp artifacts-file)
+(defonce artifacts (atom (if (.exists (io/as-file artifacts-file))
26
+ (-> artifacts-file slurp read-string)
27
+ {})
28
:meta {:last-modified
29
(get-last-modified-from-file artifacts-file)}))
30
(def millis-per-day (* 24 60 60 1000))
@@ -116,8 +118,7 @@
116
118
(defn artifact-list
117
119
[{:keys [force]}]
120
(when (or (= force "true") (stale-cache?))
- (update-artifact-cache!)
- (spit artifacts-file @artifacts))
121
+ (update-artifact-cache!))
122
(->> @artifacts keys list*))
123
124
(defn artifact-versions
0 commit comments