bug-guix
[Top][All Lists]
Advanced

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

bug#66659: [PATCH] home: services: Don't crash on-first-login when nothi


From: Carlo Zancanaro
Subject: bug#66659: [PATCH] home: services: Don't crash on-first-login when nothing to do
Date: Sat, 21 Oct 2023 20:39:21 +1100

* gnu/home/services.scm (compute-on-first-login-script): Ensure that WHEN is
syntactically valid in expansion.
---
 gnu/home/services.scm | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/gnu/home/services.scm b/gnu/home/services.scm
index 651c068f79..3f018e3893 100644
--- a/gnu/home/services.scm
+++ b/gnu/home/services.scm
@@ -435,7 +435,10 @@ (define (compute-on-first-login-script _ gexps)
          ;; after complete logout/reboot.
          (if (file-exists? xdg-runtime-dir)
              (when (claim-first-run flag-file-path)
-               #$@gexps)
+               #$@gexps
+               ;; An empty WHEN body is not syntactically valid, so we put an
+               ;; arbitrary form here to ensure it's not empty.
+               #t)
              ;; TRANSLATORS: 'on-first-login' is the name of a service and
              ;; shouldn't be translated
              (warning (G_ "XDG_RUNTIME_DIR doesn't exists, on-first-login 
script

base-commit: 80c8f5b57aa3699445fab29e0f75f5955e697509
-- 
2.41.0






reply via email to

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