107 Commits

Author SHA1 Message Date
Mike McQuaid
0cbdeeaa3c Exit with bad exit code on command failures. 2012-03-29 18:44:37 +11:00
Max Howell
6868bf0d6e Don't require formula files for brew rm --force
In fixing this I also made it so that ARGV.kegs will return the LinkedKeg if the symlink is set. Which is almost always is. This neatly avoids most multiple-kegs issues.

Fixes Homebrew/homebrew#10685.
2012-03-06 13:47:31 +00:00
Jack Nagel
1a3a1249bf Warn the user of required arguments
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-02-04 00:27:05 -06:00
Charlie Sharpsteen
94dba21f7d Centralize definition of rack in formula.rb
`rack` is a commonly used alias for `formula.prefix.parent`---so common that it
gets defined and used quite a bit. This patch makes `rack` an official method
of the `Formula` class.
2011-09-16 08:55:38 -07:00
Dave Bayer
84eae3c425 Fix uninstall.rb brew remove --force "Directory not empty" error
Finder activity such as moving the position of an icon can create an unexpected
.DS_Store file in a Cellar directory. This causes `brew remove --force` to throw
an error that is reported as

Error: Directory not empty - /usr/local/Cellar/<formula>

This fix avoids that error, by calling rmtree rather than rmdir.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2011-08-22 20:26:53 -07:00
Adam Vandenberg
6fecafb0aa Fix 'brew rm -f' 2011-03-12 16:28:15 -08:00
Max Howell
768910283a Refactor the brew command into one file per command
The code was sucking. To the extent that maintenance was hard. It's a lot
easier to work with code that is sensibly split at sensible boundaries. So
now it is more like that.

But the refactor is minimal. Because we don't want you to have more merge
hell than absolutely necessary.

If you merge you will need to pay attention to brew.h.rb (as it is deleted)
and bin/brew (as command logic is gone). It will be painful, but you will just
have to help git out by moving any changes around manually.

Note compatibility.rb. It ensures that any function renames or removals don't
break anything. We're pretty serious about backwards compatibility. And that's
because we encourage you to hack around with the innards. And we couldn't do
that if we would then just make stuff disappear behind your back.
2011-03-12 11:55:02 -08:00