~ chicken-core (chicken-5) 999b4ee25e8d2b596fb9c119bdae3c78cd519b85
commit 999b4ee25e8d2b596fb9c119bdae3c78cd519b85 Author: Mario Domenech Goulart <mario.goulart@gmail.com> AuthorDate: Thu Jul 19 20:40:25 2012 -0300 Commit: Peter Bex <peter.bex@xs4all.nl> CommitDate: Fri Jul 20 21:55:44 2012 +0200 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. Signed-off-by: Peter Bex <peter.bex@xs4all.nl> diff --git a/chicken-install.scm b/chicken-install.scm index 26747974..b252e1db 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)Trap