raco pkg: better error message for bad Git URL

This commit is contained in:
Matthew Flatt 2015-05-16 16:26:55 -06:00
parent 9272781d6d
commit 07b8007edb

View File

@ -710,6 +710,11 @@
(define (strip-ending-newline s)
(regexp-replace #rx"\n$" s ""))
(log-pkg-debug (strip-ending-newline (apply format fmt args))))
#:initial-error (lambda ()
(pkg-error (~a "Git checkout initial protocol failed;\n"
" the given URL might not refer to a Git repository\n"
" given URL: ~a")
pkg-url-str))
#:transport (string->symbol (url-scheme pkg-url)))]
[(github)
(match-define (list* user repo branch path)