Improve the message when insecure HTTP repositories are detected.
We can at least emit the URL of the repository and the path of the resource which was attempted. Fixes #2391.
This commit is contained in:
parent
694691f782
commit
cc44d42ff6
1 changed files with 16 additions and 3 deletions
|
@ -416,9 +416,22 @@ Get the latest version of Leiningen at https://leiningen.org or by executing
|
||||||
(project/init-project)))
|
(project/init-project)))
|
||||||
|
|
||||||
(defn- insecure-http-abort [& _]
|
(defn- insecure-http-abort [& _]
|
||||||
(abort "Tried to use insecure HTTP repository without TLS.
|
(let [repo (promise)]
|
||||||
This is almost certainly a mistake; however in rare cases where it's
|
(reify org.apache.maven.wagon.Wagon
|
||||||
intentional please see `lein help faq` for details."))
|
(getRepository [this])
|
||||||
|
(setTimeout [this _])
|
||||||
|
(setInteractive [this _])
|
||||||
|
(addTransferListener [this _])
|
||||||
|
(^void connect [this
|
||||||
|
^org.apache.maven.wagon.repository.Repository the-repo
|
||||||
|
^org.apache.maven.wagon.authentication.AuthenticationInfo _
|
||||||
|
^org.apache.maven.wagon.proxy.ProxyInfoProvider _]
|
||||||
|
(deliver repo the-repo) nil)
|
||||||
|
(get [this resource _]
|
||||||
|
(abort "Tried to use insecure HTTP repository without TLS:\n"
|
||||||
|
(str (.getId @repo) ": " (.getUrl @repo) "\n " resource) "\n"
|
||||||
|
"\nThis is almost certainly a mistake; for details see"
|
||||||
|
"\nhttps://github.com/technomancy/leiningen/blob/master/doc/FAQ.md")))))
|
||||||
|
|
||||||
(defn -main
|
(defn -main
|
||||||
"Command-line entry point."
|
"Command-line entry point."
|
||||||
|
|
Loading…
Reference in a new issue