mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 15:36:20 -05:00
profiles: Use 'getpwuid' when $USER and $LOGNAME are undefined.
Reported by YOANN P <yoann_mac_donald@hotmail.com>. * guix/profiles.scm (%profile-directory): Fall back to 'getpwuid' when "USER" and "LOGNAME" are undefined.
This commit is contained in:
parent
dc995fcd5a
commit
c20ba18304
1 changed files with 3 additions and 1 deletions
|
@ -1727,7 +1727,9 @@ (define %user-profile-directory
|
|||
(define %profile-directory
|
||||
(string-append %state-directory "/profiles/"
|
||||
(or (and=> (or (getenv "USER")
|
||||
(getenv "LOGNAME"))
|
||||
(getenv "LOGNAME")
|
||||
(false-if-exception
|
||||
(passwd:name (getpwuid (getuid)))))
|
||||
(cut string-append "per-user/" <>))
|
||||
"default")))
|
||||
|
||||
|
|
Loading…
Reference in a new issue