Memoize user/profiles.

This commit is contained in:
Jean Niklas L'orange 2013-01-23 18:08:27 +01:00
parent 0ef01ba38b
commit 730141f972

View file

@ -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'"