@@ -18,8 +18,10 @@
|
||||
calling `compute` with no arguments only if stale? is logical true."
|
||||
[& {:keys [file stale? compute]}]
|
||||
(when (or (not *use-cache?*) stale?)
|
||||
(let [r (compute)]
|
||||
(let [r (compute)
|
||||
dir (fs/parent file)]
|
||||
(assert (string? r))
|
||||
(fs/create-dirs (fs/parent file))
|
||||
(when-not (fs/exists? dir)
|
||||
(fs/create-dirs dir))
|
||||
(spit file r)))
|
||||
file)
|
||||
|
||||
@@ -46,7 +46,8 @@
|
||||
"Aero tag to search for a directory on $XDG_DATA_DIRS."
|
||||
(some #(let [x (fs/path % value)]
|
||||
(and (fs/exists? x) x))
|
||||
(fs/split-paths (System/getenv "XDG_DATA_DIRS"))))
|
||||
(some-> (System/getenv "XDG_DATA_DIRS")
|
||||
fs/split-paths)))
|
||||
|
||||
(defmethod aero/reader 'file
|
||||
[{:keys [source]} tag value]
|
||||
|
||||
Reference in New Issue
Block a user