Ref T5554. Currently, when a system is in a non-English language, some things sometimes do not work because we parse output for English error messages but the messages are actually in French (or whatever).
To remedy this, D9922 attempts to pass LC_ALL or LANG or some mixture of things explicitly (I haven't figured out exactly what we have to pass, yet). However, a side effect of doing this is that we wipe out the rest of the environment, because $_ENV is not (always? ever?) populated from the CLI.
Since $_ENV is empty, we end up generating a subprocess with only the overridden variables when building the subprocess enviroment with $overrides + $_ENV. For example, some of my recent commits have a bogus author string because HOME (I think?) gets wiped, so git doesn't know where to look for ~/.gitconfig.
Instead, make sure $_ENV is always populated. The only way I could see to do this is capture phpinfo(), which is very gross, but should work OK.