guix-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 1/2] services: slim: Allow non-absolute path to be used as se


From: Ludovic Courtès
Subject: Re: [PATCH 1/2] services: slim: Allow non-absolute path to be used as session command.
Date: Thu, 12 Mar 2015 21:15:04 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

宋文武 <address@hidden> skribis:

> * gnu/services/xorg.scm (xinitrc)[builder]: Don't check the existence
>   of COMMAND.  Only run ~/.xsession when it exists.

[...]

> +        (let* ((home (getenv "HOME"))
> +               (xsession-file (string-append home "/.xsession"))
> +               (session (match (command-line)
> +                          ((_ x) x)
> +                          (_     #$fallback-session))))

Could you align the right-hand sides of the ‘let*’?

> +          (if (file-exists? xsession-file)
> +              ;; Run ~/.xsession when it exists.
> +              (exec-from-login-shell xsession-file)

This will fail if ~/.xsession is not executable.  It could use
‘executable-file?’ from (guix build utils), but OTOH it may be better to
just fail in this case since it’s most likely a user error.

Thoughts?

Thanks,
Ludo’.



reply via email to

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