Allow inheriting some environment variables
See original GitHub issueIn many places you call subprocess.run()
passing it some hand-crafted environment (passing env=<some dict>
to the function). This prevents the sub-process from inherit some important variables. For example we have terraform modules that interact with kubernetes, yet they cannot see the KUBECONFIG
environment variable from the parent shell. This can result in various outcomes from authentication failures to talking to the wrong cluster leading to messing up terraform state.
Would you consider adding a way to provide a list of variable sub-processes can inherit ? Thanks.
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Exception of inheritance of environment variables
I understand that "when a process is created it inherits a duplicate environment of its parent process".
Read more >Allow inheriting environment variable in downstream pipeline
Combine the ability to inherit environment variables with the ability to pass variables to a downstream pipeline. Currently bridge jobs do not ...
Read more >How does a program inherit environment variables?
First, the shell forks. Forked process obviously has the same environment. Then a new program is executed in the child. The syscall in...
Read more >5.4. Environment Variables
By default, environment variables are inherited from a process' parent. ... Some environment variables are dangerous because many libraries and programs are ...
Read more >Why don't elevated processes inherit their environment ...
As a general rule, child processes inherit the environment of their parent. But if the parent is non-elevated and the child is elevated,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Apparently it is version 7.9.0 of tfwrapper we are using. So the fix above should solve my issue ! Will see that we update tfwrapper. Thank a lot for the prompt answer ! Hopefully that will close the issue. Will keep you informed.
Yes, sorry ! Don’t have time to investigate this further, so let’s close the issue.