all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Danny Milosavljevic <dannym@scratchpost.org>
To: Caleb Ristvedt <caleb.ristvedt@cune.org>
Cc: guix-devel@gnu.org
Subject: Re: ‘sudo’ leaves PATH unchanged… so what?
Date: Fri, 18 Jan 2019 21:29:28 +0100	[thread overview]
Message-ID: <20190118212928.452ed4e1@scratchpost.org> (raw)
In-Reply-To: <CAELvotwLq8TZp+ieTtf-DAtZnGPcOSt6vQo4SzXtQe-a11aBXw@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 808 bytes --]

On Fri, 18 Jan 2019 19:03:18 +0000
Caleb Ristvedt <caleb.ristvedt@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 #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2019-01-18 20:29 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-17 10:34 ‘sudo’ leaves PATH unchanged… so what? Ludovic Courtès
2019-01-17 11:03 ` Pierre Neidhardt
2019-01-17 11:14 ` Ricardo Wurmus
2019-01-17 12:35   ` Ludovic Courtès
2019-01-17 12:47     ` Pierre Neidhardt
2019-01-18  7:15     ` Giovanni Biscuolo
2019-01-18  7:30       ` Ricardo Wurmus
2019-01-18  8:06         ` Caleb Ristvedt
2019-01-18 11:33           ` Giovanni Biscuolo
2019-01-18 19:03             ` Caleb Ristvedt
2019-01-18 20:29               ` Danny Milosavljevic [this message]
2019-01-19  6:19                 ` swedebugia
2019-01-19 22:55                 ` Ludovic Courtès
2019-01-19 22:52           ` Ludovic Courtès
2019-01-20  2:12             ` Danny Milosavljevic
2019-01-18 10:39         ` Giovanni Biscuolo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190118212928.452ed4e1@scratchpost.org \
    --to=dannym@scratchpost.org \
    --cc=caleb.ristvedt@cune.org \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.