From b67b8217830ee6e1afdf7532a961835fd77a5519 Mon Sep 17 00:00:00 2001 From: Andrew Tropin Date: Tue, 2 Aug 2022 08:20:38 +0300 Subject: [PATCH v2 3/4] home: Use warning instead of display. * gnu/home/services/xdg.scm (compute-on-first-login-script): Use warning instead of display. --- gnu/home/services.scm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/gnu/home/services.scm b/gnu/home/services.scm index 6fbc91fab2..4376422014 100644 --- a/gnu/home/services.scm +++ b/gnu/home/services.scm @@ -368,9 +368,11 @@ (define %initialize-gettext (define (compute-on-first-login-script _ gexps) (program-file "on-first-login" - (with-imported-modules (source-module-closure '((guix i18n))) + (with-imported-modules (source-module-closure '((guix i18n) + (guix diagnostics))) #~(begin - (use-modules (guix i18n)) + (use-modules (guix i18n) + (guix diagnostics)) #$%initialize-gettext (let* ((xdg-runtime-dir (or (getenv "XDG_RUNTIME_DIR") @@ -387,7 +389,7 @@ (define (compute-on-first-login-script _ gexps) (begin #$@gexps (touch flag-file-path))) ;; TRANSLATORS: 'on-first-login' is the name of a service and ;; shouldn't be translated - (display (G_ "XDG_RUNTIME_DIR doesn't exists, on-first-login script + (warning (G_ "XDG_RUNTIME_DIR doesn't exists, on-first-login script won't execute anything. You can check if xdg runtime directory exists, XDG_RUNTIME_DIR variable is set to appropriate value and manually execute the script by running '$HOME/.guix-home/on-first-login'")))))))) -- 2.37.0