Martin Afanasjew eb5d90c1df unlinkapps: avoid deleting too many symlinks
Use `start_with?` to make sure the symlink actually points into one of
the Homebrew directories (depending on given arguments). Previously,
only a substring match was used, which would also remove a symlink to a
hypothetical `/opt/unrelated/usr/local/opt/Unrelated.app`. Even if
unlikely to occur, altering stuff unrelated to Homebrew is bad.

Furthermore, make sure to always use a trailing slash with directories.
Otherwise, e.g., `brew unlinkapps qt` will unlink .app bundles of both
`qt` and `qt5` if both are installed and `brew linkapps qt qt5` was
issued before. (Please ignore that `qt` and `qt5` offer a conflicting
set of .app bundles. This will have to be addressed elsewhere.)

Closes Homebrew/homebrew#45174.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-10-20 08:38:54 +01:00
..
2015-08-03 13:22:35 +01:00
2015-10-18 22:57:42 +08:00
2015-08-03 13:22:35 +01:00
2015-08-03 13:22:35 +01:00
2015-09-10 23:10:26 -07:00
2015-10-19 21:41:36 +08:00
2014-02-10 13:17:16 -05:00
2015-08-03 13:22:35 +01:00
2015-08-03 13:22:35 +01:00
2015-08-29 15:43:16 +01:00
2015-08-28 17:15:29 +08:00
2015-08-03 13:22:35 +01:00
2015-08-29 15:43:16 +01:00
2015-08-03 13:22:35 +01:00
2015-08-03 13:22:35 +01:00
2015-08-03 13:22:35 +01:00
2014-06-23 22:34:41 -05:00
2015-10-19 21:41:36 +08:00
2015-10-18 22:57:42 +08:00
2015-08-03 13:22:35 +01:00
2015-08-03 13:22:35 +01:00
2015-10-08 16:23:40 +08:00
2015-08-03 13:22:35 +01:00
2015-01-13 16:35:24 -05:00
2015-08-03 14:34:12 -07:00
2015-08-03 13:22:35 +01:00
2015-10-18 22:57:42 +08:00
2015-08-03 13:22:35 +01:00
2015-04-15 19:51:54 +08:00
2015-08-29 15:43:16 +01:00
2015-09-01 19:19:13 +08:00
2015-08-03 13:22:35 +01:00
2015-08-03 13:22:35 +01:00
2015-10-17 02:16:19 +01:00
2015-08-03 13:22:35 +01:00
2015-10-04 10:31:46 +02:00

Homebrew's Formula API

This is the (partially) documented public API for Homebrew. It's currently a work in progress. Sorry about that!

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!