unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#63234: cached guix shell environment not capturing environment variables set in manifest
@ 2023-05-02 15:34 Maxim Cournoyer
  2023-05-02 15:48 ` Ludovic Courtès
  0 siblings, 1 reply; 3+ messages in thread
From: Maxim Cournoyer @ 2023-05-02 15:34 UTC (permalink / raw)
  To: 63234

Hi Guix,

Consider the following manifest.scm file:

--8<---------------cut here---------------start------------->8---
(setenv "DUMMY" "hello")

(packages->manifest
 (map specification->package
      (list "hello")))
--8<---------------cut here---------------end--------------->8---

Running:

--8<---------------cut here---------------start------------->8---
$ guix shell --rebuild-cache -m manifest.scm -- sh -c 'echo $DUMMY'
hello

$ guix shell -m manifest.scm -- sh -c 'echo $DUMMY'
--8<---------------cut here---------------end--------------->8---

I think this is a recent behavior change, otherwise I wouldn't have
gotten fond of that trick ;-).

-- 
Thanks,
Maxim




^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#63234: cached guix shell environment not capturing environment variables set in manifest
  2023-05-02 15:34 bug#63234: cached guix shell environment not capturing environment variables set in manifest Maxim Cournoyer
@ 2023-05-02 15:48 ` Ludovic Courtès
  2023-05-03  2:11   ` Maxim Cournoyer
  0 siblings, 1 reply; 3+ messages in thread
From: Ludovic Courtès @ 2023-05-02 15:48 UTC (permalink / raw)
  To: Maxim Cournoyer; +Cc: 63234

Hi,

Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis:

> Consider the following manifest.scm file:
>
> (setenv "DUMMY" "hello")
>
> (packages->manifest
>  (map specification->package
>       (list "hello")))
>
>
> Running:
>
> $ guix shell --rebuild-cache -m manifest.scm -- sh -c 'echo $DUMMY'
> hello
>
> $ guix shell -m manifest.scm -- sh -c 'echo $DUMMY'
>
> I think this is a recent behavior change, otherwise I wouldn't have
> gotten fond of that trick ;-).

Hmm, I don’t think it’s a recent change.  It’s a trick that might work
“by chance” but cannot be relied on.

Not-a-bug to me!

Ludo’.




^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#63234: cached guix shell environment not capturing environment variables set in manifest
  2023-05-02 15:48 ` Ludovic Courtès
@ 2023-05-03  2:11   ` Maxim Cournoyer
  0 siblings, 0 replies; 3+ messages in thread
From: Maxim Cournoyer @ 2023-05-03  2:11 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 63234-done

Hi,

Ludovic Courtès <ludo@gnu.org> writes:

> Hi,
>
> Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis:
>
>> Consider the following manifest.scm file:
>>
>> (setenv "DUMMY" "hello")
>>
>> (packages->manifest
>>  (map specification->package
>>       (list "hello")))
>>
>>
>> Running:
>>
>> $ guix shell --rebuild-cache -m manifest.scm -- sh -c 'echo $DUMMY'
>> hello
>>
>> $ guix shell -m manifest.scm -- sh -c 'echo $DUMMY'
>>
>> I think this is a recent behavior change, otherwise I wouldn't have
>> gotten fond of that trick ;-).
>
> Hmm, I don’t think it’s a recent change.  It’s a trick that might work
> “by chance” but cannot be relied on.
>
> Not-a-bug to me!

Ah!  Okay then :-).  I'll stop using such trick.

-- 
Thanks,
Maxim




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-05-03  2:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-02 15:34 bug#63234: cached guix shell environment not capturing environment variables set in manifest Maxim Cournoyer
2023-05-02 15:48 ` Ludovic Courtès
2023-05-03  2:11   ` Maxim Cournoyer

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).