From 8bebe00a76012a07e91930dcfd68058d4309ae99 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Mon, 6 Jun 2016 18:06:58 +0200 Subject: bournish: Handle EOF in the reader. * guix/build/bournish.scm (read-bournish): Add case for EOF. --- guix/build/bournish.scm | 6 ++++-- 1 file 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 @@ (define %commands (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))) -- cgit v1.2.3