mirror of
https://github.com/rbenv/ruby-build.git
synced 2025-10-28 15:51:09 +01:00
Clear LC_ALL for tr call
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
This commit is contained in:
parent
072022f689
commit
89eb562616
1 changed files with 1 additions and 1 deletions
|
|
@ -876,7 +876,7 @@ install_jruby_launcher() {
|
|||
|
||||
fix_jruby_shebangs() {
|
||||
for file in "${PREFIX_PATH}/bin"/*; do
|
||||
if [ "$(head -c 20 "$file" | LC_CTYPE=C tr -d '\0')" = "#!/usr/bin/env jruby" ]; then
|
||||
if [ "$(head -c 20 "$file" | LC_CTYPE=C LC_ALL='' tr -d '\0')" = "#!/usr/bin/env jruby" ]; then
|
||||
sed -i.bak "1 s:.*:#\!${PREFIX_PATH}\/bin\/jruby:" "$file"
|
||||
rm "$file".bak
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue