Use warn instead of println for warnings.

For classpath in lein-core.
This commit is contained in:
Jean Niklas L'orange 2014-09-04 19:19:56 +02:00
parent c8c193bc6b
commit f95a10d79b

View file

@ -168,21 +168,20 @@
;; doesn't have a slash on it ;; doesn't have a slash on it
(= (str (.getUrl %) "/") repository)) (= (str (.getUrl %) "/") repository))
aether-repos))] aether-repos))]
(locking *out* (locking *err*
(warn "Retrieving" name "from" (.getId repo))) (warn "Retrieving" name "from" (.getId repo)))
;; else case happens for metadata files ;; else case happens for metadata files
) )
nil))))) nil)))))
:proxy (get-proxy-settings)) :proxy (get-proxy-settings))
(catch DependencyResolutionException e (catch DependencyResolutionException e
(binding [*out* *err*] ;; Cannot recur from catch/finally so have to put this in its own defn
;; Cannot recur from catch/finally so have to put this in its own defn (print-failures e)
(print-failures e) (warn "This could be due to a typo in :dependencies or network issues.")
(println "This could be due to a typo in :dependencies or network issues.") (warn "If you are behind a proxy, try setting the 'http_proxy' environment variable.")
(println "If you are behind a proxy, try setting the 'http_proxy' environment variable.") #_(when-not (some #(= "https://clojars.org/repo/" (:url (second %))) repositories)
#_(when-not (some #(= "https://clojars.org/repo/" (:url (second %))) repositories) (warn "It's possible the specified jar is in the old Clojars Classic repo.")
(println "It's possible the specified jar is in the old Clojars Classic repo.") (warn "If so see https://github.com/ato/clojars-web/wiki/Releases."))
(println "If so see https://github.com/ato/clojars-web/wiki/Releases.")))
(throw (ex-info "Could not resolve dependencies" {:suppress-msg true (throw (ex-info "Could not resolve dependencies" {:suppress-msg true
:exit-code 1} e))) :exit-code 1} e)))
(catch Exception e (catch Exception e