Subject: Re: [Shepherd 0.9.3] ‘system*’ replacement cannot be passed environment variables

From: Ludovic Courtès <[email-masked]>
Date: Thu, 22 Dec 2022 17:47:37 +0100

Adam Faiz <[email-masked]> skribis:

>> I think we’ll have to add a parameter to ‘spawn-command’ to specify
>> environment variables.
>> Ludo’.
> If you do this, can you add an #:append? flag which adds environment
> variables to the inherited environment instead of specifying the
> variables declaratively? It can be #f by default.
>
> It would be very useful for me using the shepherd as init on a foreign
> distro, so I don't have to use the `env` command.

You could always write something like:

  #:environment-variables `("EXTRA_VARIABLE=something" ,@(environ))

to append ‘EXTRA_VARIABLE’ to those of the environment.

So I don’t think we need #:append.

Thanks for your feedback,
Ludo’.