Commit Graph
301 Commits
Author SHA1 Message Date
Mike McQuaid ba2b235611 brew: use a shell wrapper script for brew
This reverts commit dfd4dd12a4.

Fixes the problems from #17683 and #17685.
2013-02-21 21:42:18 +00:00
Mike McQuaid 8b9d620bd7 brew: move to Library/brew.rb
This reverts commit ac156b36d0.
2013-02-21 21:42:18 +00:00
Mike McQuaid a6324cb761 Rename Library/Contributions/cmds -> cmd. 2013-02-18 10:42:44 +00:00
Mike McQuaid 8c02467002 Rework brew command dispatch order.
Make it no longer possible to override e.g. `brew install` with a
script if there is already a built-in Homebrew command named
`brew install`.

References #17673
2013-02-18 10:42:43 +00:00
Mike McQuaid ac156b36d0 Revert "brew: move to Library/brew.rb"
This reverts commit 67d06b84d0.

Closes #17683.
Closes #17685.
2013-02-08 08:55:53 -08:00
Mike McQuaid dfd4dd12a4 Revert "brew: use a shell wrapper script for brew"
This reverts commit 225546a3ee.
2013-02-08 08:55:42 -08:00
Mike McQuaid 225546a3ee brew: use a shell wrapper script for brew
This allows us to force using the system Ruby on OSX but allow
the development of Homebrew for Linux or Windows to not rely
on OSX paths.

Closes #17548.
2013-02-07 17:53:49 -08:00
Mike McQuaid 67d06b84d0 brew: move to Library/brew.rb 2013-02-07 17:48:29 -08:00
Misty De Meo 2c2caf7cf0 Replace sceaga/homebrew with mistydemeo/tigerbrew
@sceaga has discontinued his homebrew fork, so tigerbrew is now PPC/
Tiger users' best bet.
2012-12-27 21:55:15 -04:00
Max Howell a8fadbfaee brew -c1 one line configuration summary
At your option: `brew --config -1`.
2012-08-31 15:48:48 -04:00
Max Howell 9aa121addd If exception has no message raise again
Shows full backtrace, which is useful. Now blank "raise" statements are the equivalent of admitting programmer error. The backtrace will be useful.
2012-08-29 12:41:37 -04:00
Max Howell cf59297ccd Make brew --prefix very fast
Because people use this in .bash_profile etc. We should be as fast as possible.
2012-08-29 12:41:36 -04:00
Max Howell b1dc03861e Much better CTRL-C handling
Let's not show weird error messages when user interrupts during various stages of brew initialization.

Tested by doing `for x in $(brew search); do brew install $x; done` and pressing CTRL-C at random short intervals.
2012-08-29 12:41:35 -04:00
Misty De Meo ef27207e13 brew: downcase arg before sending to Homebrew
Fixes a case where brew would find commands with wrongly-capitalized
user input on case-insensitive systems, then error out with a confusing
message when an invalid method was sent to Homebrew. e.g.:

> brew Update
Error: undefined method `Update' for Homebrew:Module
2012-08-22 19:55:27 -05:00
Max Howell 84bf873aae Don't output Ruby warnings
We don't want bug reports about this crap, even though the user REALLY should listen to the warning message. What actually happens is they blame us instead.

This kind of warning in particular:

warning: Insecure world writable dir /usr/local/bin in PATH
2012-08-06 13:06:36 -04:00
Adam Vandenberg 7e03409233 Make --version/--verbose slightly less confusing. 2012-07-23 14:27:50 -07:00
Misty De Meo d727f8b7f3 Replace /usr/bin/ruby with full Framework path
Rationale: some users insist on replacing the /usr/bin/ruby symlink
to point to another ruby on their system, which may break homebrew.
Use the full Framework path instead, which is less likely to be tampered with.

This also reorganizes the brew --config checks to reflect the different path.

Fixes #12009.

Closes #12333.

Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
2012-06-01 09:24:25 -05:00
Jack Nagel 76604c1cd5 Unify 'which' and which_s' utility methods
'which' only returns a Pathname or nil, and doesn't care about anything
sent to stderr, so just silence it by default and combine the two
methods.

Closes #12115.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-05-07 21:05:47 -05:00
Mike McQuaid 48a82e5f02 Exit with bad exit code on command failures. 2012-03-29 18:44:37 +11:00
Mike McQuaid 9c16145d8c Set MACOS_VERSION as 0 on non-OSX platforms. 2012-03-18 15:43:39 +13:00
Mike McQuaid b27b761931 Rename external commands directory from examples.
Fixes #10829.
2012-03-18 15:34:41 +13:00
Adam Vandenberg 1f774a8141 Remove 'is this a git command?' 2012-03-07 07:00:27 -08:00
Max Howell 9b798ccb20 Move brew output for BuildError into BuildError
So upgrade can output errors but continue to upgrade the rest of the installation.
2012-03-07 12:33:47 +00:00
Max Howell 9d98450b90 Scupper sourceable output if brew install is piped
`brew install > file` should not give "export CC=/foo" output on Build Failures.

Also moved the "Using clang" output to brew when BuildError is thrown as that is where it is interesting, and not if you just do `brew --env`.
2012-03-02 00:59:39 +00:00
Charlie Sharpsteen 9e773c3344 metadata: Record installation options
Adds a new class called `Tab` that acts as a recipt for install options. A
`Tab` can be serialized to a JSON file for future reference.
2011-11-13 12:14:56 -08:00
Dougal Sutherland aa00a56c4e brew command: exit with nonzero status for unknown command name
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2011-10-27 17:55:34 -07:00
Max Howell fcf20eb3d6 Save config.log to ~/Library/Logs/Homebrew
Also tidied error output. Still could be tidied quite a lot but I am still considering how best to go about it.
2011-08-31 15:35:59 +01:00
Max Howell 63da621a3f Only error out for sudo brew install
Note this only happens if Homebrew is *not* installed sudo. Which is most of the time true.

Fixes #6899
2011-08-17 12:30:21 +01:00
Max Howell 5692191569 Rephrase comment so it makes sense 2011-08-02 14:45:52 +01:00
Max Howell 7030b51e7c If brew is installed non-root refuse to sudo brew
Rationale: people break their installs by mixing sudo and non-sudo usage. They are used to having to `sudo port install` and shit like that, so I understand why the mixing happens.
2011-07-30 11:03:34 +01:00
eregon eb121eeabb use Module#const_get instead of eval
* may be a problem if the constant is scoped (like A::B), but this is not the case
  (const.split('::').inject(Object) { |c, part| c.const_get part } would solve that)
* this was noticed in a comment of 9afc85ad but it has disappeared

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2011-03-20 19:12:29 -07:00
Max Howell 7fafb5035e brew by itself prints help but exits with non-zero 2011-03-13 13:42:48 +00:00
Max Howell 53f83ccec7 Move the Dir.getwd after help
Because we should always be able to help. And I've checked, it works fine.
2011-03-13 13:42:32 +00:00
Max Howell f828347b82 brew environment alias to --env; like gem 2011-03-13 12:53:07 +00:00
Max Howell 28d0d165a7 Support the brew instal typo
Because `gem instal` works too.
2011-03-12 11:55:05 -08:00
Max Howell 5cd927b8b5 Some Cleanup 2011-03-12 11:55:03 -08:00
Max Howell 9afc85ad33 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
Jamie Macey d778aa6912 fix warnings: ambiguous splat
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2010-10-30 14:50:54 -07:00
Jamie Macey 0c78126674 fix warnings: splat is redundant for puts
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2010-10-30 14:50:18 -07:00
Michael Dippery 091859fe4d brew log should show complete Git log if no formulae are specified
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2010-10-30 07:57:42 -07:00
Adam Vandenberg b0ddda02d0 All vcs strategies support cached_download 2010-10-25 07:34:53 -07:00
Adam Vandenberg 3ca30d2d5b Add remove --force 2010-10-17 17:52:10 -07:00
Adam Vandenberg 55152f0be4 remove - show message when multiple versions exist 2010-10-17 17:40:54 -07:00
Kevin Ballard 568e89facd Consider outdated kegs in brew uses --installed
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2010-10-07 10:17:23 -07:00
Adam Vandenberg 98a9225dd5 Tweak display of missing sha 2010-10-06 08:02:17 -07:00
Adam Vandenberg c946f1f1ab add Xcode version to brew --config 2010-10-01 21:08:42 -07:00
Tianyi Cui 69e263cb95 brew-log accept git log options & multiple brews 2010-10-01 20:29:33 -07:00
Adam Vandenberg 1c323a7015 Fix brew edit foo 2010-09-30 06:47:19 -07:00
Adam Vandenberg bfd2ab0f1b Use %w quoting in ENV list 2010-09-29 22:01:17 -07:00
Adam Vandenberg eedaa0d2f0 Tweak unknown command message 2010-09-29 22:01:08 -07:00