diff options
| author | Jack Nagel | 2013-12-14 09:35:57 -0600 |
|---|---|---|
| committer | Jack Nagel | 2013-12-14 09:35:57 -0600 |
| commit | 619a6225c00cc20b71a1a40585785a9f27bf3870 (patch) | |
| tree | 1003d59c6183fd32e918d92f72285da6a1a6aad9 /Library/Homebrew | |
| parent | 00d8cc0663616849e42cb1ce8bbaeab32c60b3d3 (diff) | |
| download | homebrew-619a6225c00cc20b71a1a40585785a9f27bf3870.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/Homebrew')
| -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 |
