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
|
(catch Exception e
|
||||||
(.printStackTrace e))))))))
|
(.printStackTrace e))))))))
|
||||||
|
|
||||||
|
(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))))))))
|
||||||
|
|
||||||
(defn profiles
|
(defn profiles
|
||||||
"Load profiles.clj from your Leiningen home if present."
|
"Load profiles.clj from your Leiningen home if present."
|
||||||
[]
|
[]
|
||||||
(try (utils/read-file (io/file (leiningen-home) "profiles.clj"))
|
(load-profiles))
|
||||||
(catch Exception e
|
|
||||||
(binding [*out* *err*]
|
|
||||||
(println "Error reading profiles.clj from" (leiningen-home))
|
|
||||||
(println (.getMessage e))))))
|
|
||||||
|
|
||||||
(defn gpg-program
|
(defn gpg-program
|
||||||
"Lookup the gpg program to use, defaulting to 'gpg'"
|
"Lookup the gpg program to use, defaulting to 'gpg'"
|
||||||
|
|
Loading…
Reference in a new issue