summary refs log tree commit diff
path: root/gnu
diff options
context:
space:
mode:
authorAndrew Tropin <andrew@trop.in>2021-08-30 12:26:19 +0300
committerOleg Pykhalov <go.wigust@gmail.com>2021-09-09 20:26:50 +0300
commita307b51ea8353289bf338b3409d06b50c89f3d84 (patch)
treece6503d75218df5d292ef59e07c4fb4e3944732a /gnu
parent990e1e0af537405418fb8272631c266de8c4a24a (diff)
downloadguix-a307b51ea8353289bf338b3409d06b50c89f3d84.tar.gz
home-services: activation: Add support for multiline env vars.
Signed-off-by: Oleg Pykhalov <go.wigust@gmail.com>
Diffstat (limited to 'gnu')
-rw-r--r--gnu/home-services.scm4
1 files changed, 2 insertions, 2 deletions
diff --git a/gnu/home-services.scm b/gnu/home-services.scm
index 16b9736d64..2a773496f0 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)