[Top][All Lists]

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

Re: ‘sudo’ leaves PATH unchanged… so what?

From: Danny Milosavljevic
Subject: Re: ‘sudo’ leaves PATH unchanged… so what?
Date: Fri, 18 Jan 2019 21:29:28 +0100

On Fri, 18 Jan 2019 19:03:18 +0000
Caleb Ristvedt <address@hidden> 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: pgppMZlirUTVt.pgp
Description: OpenPGP digital signature

reply via email to

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