guix-commits
[Top][All Lists]
Advanced

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

03/06: home-services: activation: Add support for multiline env vars.


From: guix-commits
Subject: 03/06: home-services: activation: Add support for multiline env vars.
Date: Mon, 30 Aug 2021 19:18:17 -0400 (EDT)

wigust pushed a commit to branch wip-guix-home
in repository guix.

commit 03a7d6203a08c3954c3240b329adc7bded6bec58
Author: Andrew Tropin <andrew@trop.in>
AuthorDate: Mon Aug 30 12:26:19 2021 +0300

    home-services: activation: Add support for multiline env vars.
    
    Signed-off-by: Oleg Pykhalov <go.wigust@gmail.com>
---
 gnu/home-services.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/home-services.scm b/gnu/home-services.scm
index 16b9736..2a77349 100644
--- a/gnu/home-services.scm
+++ b/gnu/home-services.scm
@@ -324,7 +324,7 @@ extended with one gexp.")))
                               #f))))
        (if (file-exists? (he-init-file new-home))
            (let* ((port   ((@ (ice-9 popen) open-input-pipe)
-                           (format #f "source ~a && env"
+                           (format #f "source ~a && env -0"
                                    (he-init-file new-home))))
                   (result ((@ (ice-9 rdelim) read-delimited) "" port))
                   (vars (map (lambda (x)
@@ -333,7 +333,7 @@ extended with one gexp.")))
                                        (string-drop x (1+ si)))))
                              ((@ (srfi srfi-1) remove)
                               string-null?
-                              (string-split result #\newline)))))
+                              (string-split result #\nul)))))
              (close-port port)
              (map (lambda (x) (setenv (car x) (cdr x))) vars)
 



reply via email to

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