aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew
diff options
context:
space:
mode:
authorMike McQuaid2016-10-12 11:35:37 +0100
committerMike McQuaid2016-10-12 11:35:37 +0100
commit2e306bcde06c48cce179bfd100672d5028e5fb24 (patch)
tree4d2af680e58058e62f570481764608b7b1d15898 /Library/Homebrew
parent5e90c5a7a4fc002dd7a761a71bdd36be4b596a04 (diff)
downloadbrew-2e306bcde06c48cce179bfd100672d5028e5fb24.tar.bz2
keg_relocate: relocate text_executable? files.
This was omitted from #1258, incorrectly fixed in #1267, reverted in #1268 and re-applied in this commit.
Diffstat (limited to 'Library/Homebrew')
-rw-r--r--Library/Homebrew/keg_relocate.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/Library/Homebrew/keg_relocate.rb b/Library/Homebrew/keg_relocate.rb
index dcf592ae4..47e24cb16 100644
--- a/Library/Homebrew/keg_relocate.rb
+++ b/Library/Homebrew/keg_relocate.rb
@@ -73,7 +73,14 @@ class Keg
# http://bugs.gw.com/view.php?id=292
with_custom_locale("C") do
files = path.find.reject { |pn|
- pn.symlink? || pn.directory? || Metafiles::EXTENSIONS.include?(pn.extname)
+ next true if pn.symlink?
+ next true if pn.directory?
+ next true if Metafiles::EXTENSIONS.include?(pn.extname)
+ if pn.text_executable?
+ text_files << pn
+ next true
+ end
+ false
}
output, _status = Open3.capture2("/usr/bin/xargs -0 /usr/bin/file --no-dereference --brief",
stdin_data: files.join("\0"))