Hey,

Caleb Ristvedt <caleb.ristv...@cune.org> skribis:

> I'd just like to add that if a user has guix installed for root but only
> really keeps their user's guix up to date (I imagine a fairly common
> situation), they're in for a weird situation when using sudo: a
> bleeding-edge guix will complain about being outdated, since sudo (even
> with -E) sets $USER, which is used to determine which file's timestamp
> should be used for deciding whether the installed guix is outdated.
> Basically, your shiny new guix warns you that someone else's dirty old guix
> is old.

True, that’s super weird!  (Actually I think it’s $HOME, not $USER.)

Currently the ‘xdg-directory’ procedure (and thus ‘config-directory’,
which by default gives ~/.config/guix) does this:

          (or (getenv variable)
              (and=> (or (getenv "HOME")
                         (passwd:dir (getpwuid (getuid))))
                     (cut string-append <> suffix)))

I think giving $HOME higher precedence than /etc/passwd is the “right”
behavior (the behavior people expect from programs in general), but it’s
true that it’s confusing in this case.

Thoughts?

Ludo’.

Reply via email to