mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-17 17:20:29 +02:00
Fix "fail" helper in guild compile
* module/scripts/compile.scm (fail): Users expect this to be a format string, so adapt. (compile): Fix use that passed multiple strings.
This commit is contained in:
parent
21885aa4ba
commit
6c741a04ef
1 changed files with 6 additions and 7 deletions
|
@ -46,8 +46,8 @@
|
|||
(define %summary "Compile a file.")
|
||||
|
||||
|
||||
(define (fail . messages)
|
||||
(format (current-error-port) "error: ~{~a~}~%" messages)
|
||||
(define (fail message . args)
|
||||
(format (current-error-port) "error: ~?~%" message args)
|
||||
(exit 1))
|
||||
|
||||
(define %options
|
||||
|
@ -260,11 +260,10 @@ Report bugs to <~A>.~%"
|
|||
(set! %load-path (append load-path %load-path))
|
||||
(set! %load-should-auto-compile #f)
|
||||
|
||||
(if (and output-file
|
||||
(or (null? input-files)
|
||||
(not (null? (cdr input-files)))))
|
||||
(fail "`-o' option can only be specified "
|
||||
"when compiling a single file"))
|
||||
(when (and output-file
|
||||
(or (null? input-files)
|
||||
(not (null? (cdr input-files)))))
|
||||
(fail "`-o' option can only be specified when compiling a single file"))
|
||||
|
||||
;; Install a SIGINT handler. As a side effect, this gives unwind
|
||||
;; handlers an opportunity to run upon SIGINT; this includes that of
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue