aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMike McQuaid2016-10-12 12:06:56 +0100
committerGitHub2016-10-12 12:06:56 +0100
commit16793781b3470b93b49060672d871642dcf433d1 (patch)
tree68760d3b009158c77b993459620ca9f4b2e0ef8c /Library
parenta812e9541799d6a296c561dadcb6aec3a0418c75 (diff)
parent2e306bcde06c48cce179bfd100672d5028e5fb24 (diff)
downloadbrew-16793781b3470b93b49060672d871642dcf433d1.tar.bz2
Merge pull request #1269 from MikeMcQuaid/keg-relocate-text-executable-files
keg_relocate: relocate text_executable? files.
Diffstat (limited to 'Library')
-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"))