me
/
guix
Archived
1
0
Fork 0

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

Signed-off-by: Oleg Pykhalov <go.wigust@gmail.com>
master
Andrew Tropin 2021-08-30 12:26:19 +03:00 committed by Oleg Pykhalov
parent 990e1e0af5
commit a307b51ea8
No known key found for this signature in database
GPG Key ID: 167F8EA5001AFA9C
1 changed files with 2 additions and 2 deletions

View File

@ -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)