Memoize user/profiles.
This commit is contained in:
parent
0ef01ba38b
commit
730141f972
1 changed files with 11 additions and 5 deletions
|
@ -23,14 +23,20 @@
|
|||
(catch Exception e
|
||||
(.printStackTrace e))))))))
|
||||
|
||||
(defn profiles
|
||||
(def ^:private load-profiles
|
||||
"Load profiles.clj from your Leiningen home if present."
|
||||
[]
|
||||
(memoize
|
||||
(fn []
|
||||
(try (utils/read-file (io/file (leiningen-home) "profiles.clj"))
|
||||
(catch Exception e
|
||||
(binding [*out* *err*]
|
||||
(println "Error reading profiles.clj from" (leiningen-home))
|
||||
(println (.getMessage e))))))
|
||||
(println (.getMessage e))))))))
|
||||
|
||||
(defn profiles
|
||||
"Load profiles.clj from your Leiningen home if present."
|
||||
[]
|
||||
(load-profiles))
|
||||
|
||||
(defn gpg-program
|
||||
"Lookup the gpg program to use, defaulting to 'gpg'"
|
||||
|
|
Loading…
Reference in a new issue