On Fri, 18 Jan 2019 19:03:18 +0000
Caleb Ristvedt <caleb.ristv...@cune.org> wrote:

> To be clear, it's not so much a real problem as an eyesore. 'sudo guix
> package ...' and 'sudo guix pull' will operate on root's profile(s) as
> expected, but that also means 'sudo guix system reconfigure' will look at
> root's profile when deciding whether to say that it's out of date, even
> though the guix actually used for reconfiguring may not be out of date. It
> pretty much only ever comes up when reconfiguring, but for those like
> myself who are worried by messages like that it can be confusing to try to
> resolve.

There's an environment variable "SUDO_USER" which still contains the name
of the original user.

We could check SUDO_USER instead of USER if USER=root, otherwise check USER.

Attachment: pgpMJGUovpNcE.pgp
Description: OpenPGP digital signature

Reply via email to