Jack Nagel dd4302ae9b Improve text_executable heuristic
Previously we detected this by reading the first line of the file.
However, "first line" is meaningless when dealing with binary files, but
IO#readline will happily keep reading until it finds a newline
character, which can result in some unnecessarily large buffers.

Aside from the performance issue, this causes an additional problem
under Ruby 1.9: trying to match the binary string against a pattern will
raise ArgumentError (unless the binary string just happens to also be
valid UTF-8, heh).

Fix both issues: only read the first 1024 bytes, as no sane shebang will
ever be that long, and use a plain read(), which returns an ASCII
encoded string even on 1.9.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-09-27 17:26:26 -05:00
2012-09-27 17:26:26 -05:00
2012-08-22 09:43:30 -07:00
2012-02-24 19:51:20 -06:00

Homebrew

Features, usage and installation instructions are summarized on the homepage.

What Packages Are Available?

  1. You can browse the Formula directory on GitHub.
  2. Or type brew search for a list.
  3. Or run brew server to browse packages off of a local web server.
  4. Or visit braumeister.org to browse packages online.

More Documentation

brew help or man brew or check our wiki.

Who Are You?

I'm Max Howell and I'm a splendid chap.

Description
🍺 The missing package manager for macOS (or Linux)
Readme 144 MiB
4.6.25 Latest
2025-09-16 21:53:50 +00:00
Languages
Ruby 92%
Shell 5.2%
Roff 2.1%
HTML 0.5%