aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd/link.rb
diff options
context:
space:
mode:
authorMax Howell2012-08-10 09:33:33 -0400
committerMax Howell2012-08-10 09:33:44 -0400
commit45b84df1bdcbdcd75022e024d1cf400f1c73fdaa (patch)
tree0b509263c88e961c6558f10d616bb66dcc7b6de8 /Library/Homebrew/cmd/link.rb
parentf5eaef0aeef134468f3681962d4bf2934ec015d3 (diff)
downloadbrew-45b84df1bdcbdcd75022e024d1cf400f1c73fdaa.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/link.rb')
-rw-r--r--Library/Homebrew/cmd/link.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/Library/Homebrew/cmd/link.rb b/Library/Homebrew/cmd/link.rb
index 2595af3b8..8e942cd91 100644
--- a/Library/Homebrew/cmd/link.rb
+++ b/Library/Homebrew/cmd/link.rb
@@ -4,9 +4,7 @@ module Homebrew extend self
raise KegUnspecifiedError if ARGV.named.empty?
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 link'"
+ raise "Cowardly refusing to `sudo brew link'\n#{SUDO_BAD_ERRMSG}"
end
if ARGV.force? then mode = :force