summaryrefslogtreecommitdiff
path: root/guix/build/bournish.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2016-06-06 18:06:58 +0200
committerLudovic Courtès <ludo@gnu.org>2016-06-06 18:14:52 +0200
commit8bebe00a76012a07e91930dcfd68058d4309ae99 (patch)
tree4316e2b78c7a5f35fd6b61e1ff836ac7eb27b282 /guix/build/bournish.scm
parentfebf7ef67570749067c2c2e9376fdbefed427023 (diff)
downloadgnu-guix-8bebe00a76012a07e91930dcfd68058d4309ae99.tar
gnu-guix-8bebe00a76012a07e91930dcfd68058d4309ae99.tar.gz
bournish: Handle EOF in the reader.
* guix/build/bournish.scm (read-bournish): Add case for EOF.
Diffstat (limited to 'guix/build/bournish.scm')
-rw-r--r--guix/build/bournish.scm6
1 files changed, 4 insertions, 2 deletions
diff --git a/guix/build/bournish.scm b/guix/build/bournish.scm
index 4022796658..3bea1c80c2 100644
--- a/guix/build/bournish.scm
+++ b/guix/build/bournish.scm
@@ -134,8 +134,10 @@ commands such as 'ls' and 'cd'; it lacks globbing, pipes---everything.\n"))
(define (read-bournish port env)
"Read a Bournish expression from PORT, and return the corresponding Scheme
code as an sexp."
- (match (string-tokenize (read-line port))
- ((command args ...)
+ (match (read-line port)
+ ((? eof-object? eof)
+ eof)
+ ((= string-tokenize (command args ...))
(match (assoc command %commands)
((command proc) ;built-in command
(apply proc (map expand-variable args)))