Child processes can inherit initial environment variables after hide-env
#12900
Labels
🐛 bug
Something isn't working
environment
external-commands
Issues related to external commands
priority
these issues are important
Milestone
Describe the bug
When we spawn child processes, we do not clear environment variables. This means it is possible for child processes to inherit environment variables that are supposed to be hidden via
hide-env
.How to reproduce
The child shell first hides the
TEST
environment variable. It will not be able to use the environment variable directly. However, the child shell then spawns a grandchild shell. The grandchild is able to access theTEST
environment variable and will print1
.Expected behavior
An error saying that the
TEST
environment variable could not be found.Screenshots
No response
Configuration
Bug is present on 0.92.2, 0.93.0, latest main, and maybe since the beginning of time.
Additional context
No response
The text was updated successfully, but these errors were encountered: