diff options
| author | Jack Nagel | 2013-12-14 09:35:57 -0600 |
|---|---|---|
| committer | Jack Nagel | 2013-12-14 09:35:57 -0600 |
| commit | 7a10493387a2e4fc921a6a12b1bd07d8166ebfac (patch) | |
| tree | 002ed39200ed3d5d0ca98357ca42691e5bb7c511 /Library | |
| parent | 24d8791dfbf21c5f536f555e6ccb8ee9d6ba19c0 (diff) | |
| download | brew-7a10493387a2e4fc921a6a12b1bd07d8166ebfac.tar.bz2 | |
keg: try to avoid disk IO when possible
Calling Pathname#text_executable? reads in the first 1024 bytes of the
file, so try the basename check (which requires no filesystem access)
first.
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/keg_fix_install_names.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Library/Homebrew/keg_fix_install_names.rb b/Library/Homebrew/keg_fix_install_names.rb index 4e596a1f8..1eb2e5737 100644 --- a/Library/Homebrew/keg_fix_install_names.rb +++ b/Library/Homebrew/keg_fix_install_names.rb @@ -181,7 +181,7 @@ class Keg # find name-config scripts, which can be all over the keg Pathname.new(self).find do |pn| next if pn.symlink? or pn.directory? - pkgconfig_files << pn if pn.text_executable? and pn.basename.to_s.end_with? '-config' + pkgconfig_files << pn if pn.basename.to_s.end_with? '-config' and pn.text_executable? end pkgconfig_files end |
