aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/extend/pathname.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/Library/Homebrew/extend/pathname.rb b/Library/Homebrew/extend/pathname.rb
index 8ea1b9a93..9f6f1910b 100644
--- a/Library/Homebrew/extend/pathname.rb
+++ b/Library/Homebrew/extend/pathname.rb
@@ -199,9 +199,7 @@ class Pathname
end
def text_executable?
- %r[^#!\s*.+] === open('r') { |f| f.readline }
- rescue EOFError
- false
+ %r[^#!\s*\S+] === open('r') { |f| f.read(1024) }
end
def incremental_hash(hasher)