>From 8e60a800111595b253fa7688ab83698b33c22e42 Mon Sep 17 00:00:00 2001 From: Mario Domenech Goulart Date: Thu, 19 Jul 2012 20:40:25 -0300 Subject: [PATCH] chicken-install: abort when transport and location cannot be determined This patch fixes the number of arguments passed to the procedure given as argument to `with-default-sources', which would raise an arity error when transport and location could not be determined (issue found by Peter Bex). That procedure is now given a thunk that will properly abort chicken-install, displaying a meaningful message. --- chicken-install.scm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/chicken-install.scm b/chicken-install.scm index 2674797..b252e1d 100644 --- a/chicken-install.scm +++ b/chicken-install.scm @@ -339,7 +339,14 @@ (define (with-default-sources proc) (let trying-sources ([defs (known-default-sources)]) (if (null? defs) - (proc #f #f) + (proc #f #f + (lambda () + (with-output-to-port (current-error-port) + (lambda () + (print "Could not determine a source of extensions. " + "Please, specify a location and a transport for " + "a source."))) + (exit 1))) (let* ([def (car defs)] [locn (resolve-location (cadr (or (assq 'location def) -- 1.7.9.5