mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2026-07-03 05:14:05 +02:00
gnu: home-services: Fix serialization of environment-variables.
* gnu/home/services/ssh.scm (serialize-string-alist): Fix serialization. (serialize-symbol): Check for %unset-marker% symbol. (serialize-field-name): Fix typo in name SendEnv. Change-Id: I69f340178ef30e9d03a87be4a6495b1704f140f4 Signed-off-by: Ludovic Courtès <ludo@gnu.org> Merges: #8659
This commit is contained in:
committed by
Ludovic Courtès
parent
1238aa538c
commit
bc998dcd1c
@@ -89,7 +89,7 @@
|
||||
(define (serialize-field-name name)
|
||||
(match name
|
||||
('accepted-key-types "PubkeyAcceptedKeyTypes")
|
||||
('sent-environment-variables "SentEnv")
|
||||
('sent-environment-variables "SendEnv")
|
||||
('environment-variables "SetEnv")
|
||||
('control-file-name "ControlPath")
|
||||
(_
|
||||
@@ -139,8 +139,10 @@
|
||||
(define-maybe natural-number)
|
||||
|
||||
(define (serialize-symbol field value)
|
||||
(string-append " " (serialize-field-name field) " "
|
||||
(symbol->string value) "\n"))
|
||||
(if (maybe-value-set? value)
|
||||
(string-append " " (serialize-field-name field) " "
|
||||
(symbol->string value) "\n")
|
||||
""))
|
||||
|
||||
(define-maybe symbol)
|
||||
|
||||
@@ -178,7 +180,7 @@
|
||||
(string-join
|
||||
(map (match-lambda
|
||||
((key . value)
|
||||
(format #nil "~a = ~s~%" (serialize-field-name key) value)))
|
||||
(format #nil "~s" (string-append key "=" value))))
|
||||
lst) " ") "\n"))
|
||||
|
||||
(define-maybe string-alist)
|
||||
|
||||
Reference in New Issue
Block a user