Exec: stop setting a locale on Unix. #9449
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The en_US locale can't be used on systems where it is not installed. This is common in container images.
On such systems, setting the locale to en_US.UTF-8 causes bash to print unexpected warnings to standard error.
When Exec.LogStandardErrorAsError is set, these warnings cause the Task to fail due to logging errors.
This changes to no longer set the locale explicitly. The Exec command will now run under the system locale instead of US English. Most tools should functionally behave the same under any locale.
Users may still set the locale environment variables themselves through Exec.EnvironmentVariables.
The previous behavior can also be restored as it is under a changewave.
@KalleOlaviNiemitalo @rainersigwald @wfurt @danmoseley ptal.
cc @mthalman @omajid
Fixes #4194