diff options
| author | Mike McQuaid | 2015-07-20 12:06:13 +0100 |
|---|---|---|
| committer | Mike McQuaid | 2015-07-20 12:06:13 +0100 |
| commit | 70739e9f05d15fd17a9d6817e52d537d924bb893 (patch) | |
| tree | 3df6196adc40ffcb0891f115dc31da3e20c7f0d8 /Library | |
| parent | 653053f184f1acb79e08930a7031338d8af7678e (diff) | |
| download | brew-70739e9f05d15fd17a9d6817e52d537d924bb893.tar.bz2 | |
keg_relocate: also relocate executable text files.
There are times (e.g. `ocaml`) when the `text_executable?` test will
match even although `file` does not consider it a text file. Ensure
that it's relocated in this case correctly.
References Homebrew/homebrew#41663.
Closes Homebrew/homebrew#41926.
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/keg_relocate.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Library/Homebrew/keg_relocate.rb b/Library/Homebrew/keg_relocate.rb index 8b4c76c76..04e542141 100644 --- a/Library/Homebrew/keg_relocate.rb +++ b/Library/Homebrew/keg_relocate.rb @@ -163,7 +163,10 @@ class Keg path.find do |pn| next if pn.symlink? or pn.directory? next if Metafiles::EXTENSIONS.include? pn.extname - text_files << pn if Utils.popen_read("/usr/bin/file", "--brief", pn).include?("text") + if Utils.popen_read("/usr/bin/file", "--brief", pn).include?("text") || + pn.text_executable? + text_files << pn + end end text_files |
