Mike McQuaid ca47b47f77
Speedup brew --prefix <formula>
This case is _really_ slow even although it's something we encourage
people to run often and build systems often do. The `brew --prefix`
case is really fast because it's just in Bash so: let's pull the
`brew --prefix <formula>` case into Bash too.

This doesn't handle any edge-cases like `--installed` and the formula
detection is pretty simple.

Also, to make this behaviour consistent, never output `Cellar` paths
from the (Ruby) `brew --prefix`; we never want people relying on the
Cellar paths anyway, only output them if the formula wasn't installed
(where, arguably, using a Cellar path is even worse) and the speedup is
worth this deviation in behaviour.
2021-02-25 17:07:28 +00:00
..
2021-02-25 17:07:28 +00:00
2021-02-06 23:10:24 +01:00
2021-01-26 16:19:47 -05:00
2021-02-25 17:07:28 +00:00
2021-02-25 06:02:26 +00:00
2021-01-22 11:26:46 -08:00
2021-01-26 10:16:32 +00:00
2021-02-15 21:08:10 +05:30
2021-02-23 11:31:43 -08:00
2021-01-29 19:50:24 +00:00
2021-02-25 17:07:28 +00:00
2021-01-26 16:19:47 -05:00
2021-01-26 16:19:47 -05:00
2021-01-26 16:19:47 -05:00
2021-01-29 20:56:59 +00:00
2021-02-16 09:25:34 +00:00
2021-02-15 22:38:27 +05:30
2021-02-15 22:38:27 +05:30
2021-01-26 12:02:30 -05:00
2021-02-10 22:36:42 -05:00
2021-01-29 20:56:59 +00:00
2021-02-25 17:07:28 +00:00
2021-01-26 15:36:44 -05:00
2021-02-15 22:38:27 +05:30
2021-02-14 11:58:05 -05:00
2021-02-15 22:38:27 +05:30
2021-01-26 15:36:44 -05:00
2021-01-26 16:19:47 -05:00
2021-01-26 15:36:43 -05:00
2021-02-14 11:58:05 -05:00
2021-02-14 11:58:05 -05:00

Homebrew's Formula API

This is the public API for Homebrew.

The main class you should look at is the {Formula} class (and classes linked from there). That's the class that's used to create Homebrew formulae (i.e. package descriptions). Assume anything else you stumble upon is private.

You may also find the Formula Cookbook and Ruby Style Guide helpful in creating formulae.

Good luck!