summaryrefslogtreecommitdiff
path: root/module/scripts/compile.scm
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2020-05-11 11:14:30 +0200
committerAndy Wingo <wingo@pobox.com>2020-05-11 11:14:30 +0200
commit6c741a04eff2c2687bb2266e0538491f0aa72a32 (patch)
tree81a2d4a42310e898db524d42d9cede5c91d73dff /module/scripts/compile.scm
parent21885aa4babd29b118e3e5f99c6b769d03831735 (diff)
downloadguile-6c741a04eff2c2687bb2266e0538491f0aa72a32.tar.gz
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.
Diffstat (limited to 'module/scripts/compile.scm')
-rw-r--r--module/scripts/compile.scm13
1 files changed, 6 insertions, 7 deletions
diff --git a/module/scripts/compile.scm b/module/scripts/compile.scm
index 5d91538c3..6440c4086 100644
--- a/module/scripts/compile.scm
+++ b/module/scripts/compile.scm
@@ -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