rbenv / ruby-build

A tool to download, compile, and install Ruby on Unix-like systems.
https://rbenv.org/man/ruby-build.1
MIT License
3.89k stars 785 forks source link

Clear LC_ALL for tr call #2429

Closed headius closed 3 months ago

headius commented 3 months ago

This resolves additional issues when tr is called in a shell that has set LC_ALL to a specific encoding. In that case, the tr may fail to ignore binary files, expecting that they are in some encoding.

See https://github.com/rbenv/ruby-build/issues/2279

headius commented 3 months ago

@eregon @mislav I took a stab at this based on the discussion. It should clear LC_ALL in the tr call, which I believe resolves the encoding error on environments with an existing LC_ALL env.

Please check my work.