guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

86/197: installer: slurp: Ignore blank lines in output.


From: Danny Milosavljevic
Subject: 86/197: installer: slurp: Ignore blank lines in output.
Date: Mon, 3 Jul 2017 20:37:05 -0400 (EDT)

dannym pushed a commit to branch wip-installer-2
in repository guix.

commit 0f3f14f626e55ada127503977aa3aa7091f82ea2
Author: John Darrington <address@hidden>
Date:   Wed Jan 11 07:36:51 2017 +0100

    installer: slurp: Ignore blank lines in output.
    
    * gnu/system/installer/utils.scm (slurp): Ignore blank lines in output.
---
 gnu/system/installer/utils.scm | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/gnu/system/installer/utils.scm b/gnu/system/installer/utils.scm
index 079c264..6de519b 100644
--- a/gnu/system/installer/utils.scm
+++ b/gnu/system/installer/utils.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2016 John Darrington <address@hidden>
+;;; Copyright © 2016, 2017 John Darrington <address@hidden>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -193,7 +193,10 @@ which will process each string before returning it."
     (let  ((l (read-line port)))
       (if (eof-object? l)
          (reverse line-list)
-         (lp (cons (if proc (proc l) l) line-list))))))
+         (lp
+           (if (string= l "") ;; Ignore blank lines
+               line-list
+               (cons (if proc (proc l) l) line-list)))))))
 
 
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]