aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd/install.rb
diff options
context:
space:
mode:
authorMax Howell2012-08-10 09:33:33 -0400
committerMax Howell2012-08-10 09:33:44 -0400
commit2f8f17f13389e442423c79f4e457fcc606d5054a (patch)
tree7568f9f0aae3e56a8462352c9151d9bb5f4e0c30 /Library/Homebrew/cmd/install.rb
parent8f9ec8f3935425dee2399d40dc8777ab50adb201 (diff)
downloadhomebrew-2f8f17f13389e442423c79f4e457fcc606d5054a.tar.bz2
Be more verbose when users insist on being sudoers
If you google for "Cowardly refusing to sudo brew" you get a lot of confused users who didn't read any of the Homebrew documentation and then had a hissy-fit.
Diffstat (limited to 'Library/Homebrew/cmd/install.rb')
-rw-r--r--Library/Homebrew/cmd/install.rb6
1 files changed, 2 insertions, 4 deletions
diff --git a/Library/Homebrew/cmd/install.rb b/Library/Homebrew/cmd/install.rb
index aa7987048..319b277fd 100644
--- a/Library/Homebrew/cmd/install.rb
+++ b/Library/Homebrew/cmd/install.rb
@@ -2,7 +2,7 @@ require 'formula_installer'
require 'hardware'
require 'blacklist'
-module Homebrew extend self
+module Homebrew extend self
def install
raise FormulaUnspecifiedError if ARGV.named.empty?
@@ -15,9 +15,7 @@ module Homebrew extend self
end unless ARGV.force?
if Process.uid.zero? and not File.stat(HOMEBREW_BREW_FILE).uid.zero?
- # note we only abort if Homebrew is *not* installed as sudo and the user
- # calls brew as root. The fix is to chown brew to root.
- abort "Cowardly refusing to `sudo brew install'"
+ raise "Cowardly refusing to `sudo brew install'\n#{SUDO_BAD_ERRMSG}"
end
install_formulae ARGV.formulae