aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2012-06-03 22:33:45 -0500
committerJack Nagel2012-06-03 22:34:28 -0500
commit1cce85b1f1946279ecbcbbc0e459071e19ccf6fc (patch)
tree01780e54939f19ada816a93ee78cd7c98a2e8bd7 /Library
parentd1a48063906ed63cbdf1f014b6090cbbdcfedd97 (diff)
downloadbrew-1cce85b1f1946279ecbcbbc0e459071e19ccf6fc.tar.bz2
Handle EOF in Pathname#text_executable?
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/extend/pathname.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/Library/Homebrew/extend/pathname.rb b/Library/Homebrew/extend/pathname.rb
index bd0e6154e..d171a6d6b 100644
--- a/Library/Homebrew/extend/pathname.rb
+++ b/Library/Homebrew/extend/pathname.rb
@@ -273,6 +273,8 @@ class Pathname
def text_executable?
%r[#!\s*(/.+)+] === open('r') { |f| f.readline }
+ rescue EOFError
+ false
end
def incremental_hash(hasher)