From af4c103595a725194318f40fc5aba110772ff417 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Thu, 14 Jul 2022 00:54:40 +0200 Subject: home: services: environment-variables: Double-quote values. Fixes . Reported by Maxime Devos . * gnu/home/services.scm (environment-variable-shell-definitions): New procedure, with code formerly in 'serialize-posix-env-vars'. (environment-variables->setup-environment-script): Change "setup-environment" from 'mixed-text-file' to 'computed-file', and use 'environment-variable-shell-definitions'. * tests/guix-home.sh: Test it. * gnu/home/services/shells.scm (serialize-posix-env-vars): Delegate to 'environment-variable-shell-definitions'. --- tests/guix-home.sh | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tests') diff --git a/tests/guix-home.sh b/tests/guix-home.sh index a3c979530d..1d1acbfd6e 100644 --- a/tests/guix-home.sh +++ b/tests/guix-home.sh @@ -79,6 +79,10 @@ trap 'chmod -Rf +w "$test_directory"; rm -rf "$test_directory"' EXIT (guix-defaults? #t) (bashrc (list (local-file "dot-bashrc"))))) + (simple-service 'add-environment-variable + home-environment-variables-service-type + '(("TODAY" . "26 messidor"))) + (simple-service 'home-bash-service-extension-test home-bash-service-type (home-bash-extension @@ -141,6 +145,7 @@ EOF # the content of bashrc-test-config.sh" grep -q "the content of ~/.config/test.conf" "${HOME}/.config/test.conf" grep '^export PS1="\$GUIX_ENVIRONMENT λ "$' "${HOME}/.bash_profile" + ( . "${HOME}/.guix-home/setup-environment"; test "$TODAY" = "26 messidor" ) # This one should still be here. grep "stay around" "$HOME/.config/random-file" -- cgit v1.2.3