darling
darling copied to clipboard
Provide a "clean" shell environment by default
As seen in #1115, sometimes the host's shell environment can be configured in a way that is incompatible with Darling containers. It would probably be better behavior for Darling to clean out the environment for the shell by default and add a flag like sudo's -E flag that would allow a single shell instance to inherit all the environment variables of the host shell verbatim.
However, note that I say "clean" and not "clear". There are environment variables that are necessary for GUI applications to function properly, for example. Therefore, we would have to selectively preserve environment variables by default. In addition to the -E flag described before, we could also have a flag that would completely clear the environment for the shell, including those variables that we typically would like to preserve.