curved-television-6568
10/07/2021, 7:12 AMenough-analyst-54434
10/07/2021, 2:15 PMcurved-television-6568
10/07/2021, 2:47 PMProcess -> ProcessResult
would inject that.. but I see that you’ll have to Get
the SubprocessEnvironment when creating the Process
if you want to have it included.
Not saying this is a bad thing, only that it is not clear from the documentation that it is up to each Process
request whether to use the extra sub proc env vars.
If we’d want it for all processes, I think it could be doable, but there’d need to be an extra level of indirection between the Process
request, and the rule actually executing it (looks like it is in the rust engine), so I’ve no idea how big a change that would be (and probably not worth it).
So, I suggest to perhaps add a short sentence to the docs, highlighting the current state, that it is up to each process invocation to respect the configuration (if desired), and currently it is only the subprocesses invoking pex’es that does so.Process
Like there is a VenvPexProcess -> Process
rule, there could be a more generic ProcessRequest -> Process
that adds in the SubprocessEnvironment for you.. mm, but I’m not convinced that this is a good idea…witty-crayon-22786
10/07/2021, 4:23 PM[subprocess-environment]
should probably be renamed and bounded in scope, because any sort of “set an environment variable _everywhere_” option is likely to be too big a hammer