guix-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] scripts: Add 'environment' command.


From: David Thompson
Subject: Re: [PATCH] scripts: Add 'environment' command.
Date: Sat, 11 Oct 2014 08:27:06 -0400
User-agent: Notmuch/0.18.1 (http://notmuchmail.org) Emacs/24.3.1 (x86_64-pc-linux-gnu)

Ludovic Courtès <address@hidden> writes:

> David Thompson <address@hidden> skribis:
>
>> Fixed typo and pushed!
>
> Yay!
>
> I just noticed that ‘guix environment foo’, without -E, doesn’t work for
> me because my .bashrc & co. reset PATH, CPATH, etc.
>
> Conversely, ‘guix environment foo -E /bin/sh’ works, because when
> invoked as ‘sh’, Bash does not read .bashrc.
>
> I’m not sure if it’s something wrong with my Bash initialization files
> or something that might affect others.  WDYT?
>

I don't think it's something "wrong" with your files, really, but it is
incompatible with the way 'guix environment' currently operates.

I took another look at nix-build to see how they do things.  They create
a bashrc file in a temporary directory and run bash (or whatever
$NIX_BUILD_SHELL is) with the '--rcfile' flag so that the user's bashrc
isn't used.  We could do something similar, but right now I don't have
any reason to believe that all shells accept an '--rcfile' option, so it
could easily break other setups.

Thoughts?

-- 
David Thompson
Web Developer - Free Software Foundation - http://fsf.org
GPG Key: 0FF1D807
Support the FSF: https://fsf.org/donate



reply via email to

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