aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/exceptions.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/exceptions.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/exceptions.rb')
-rw-r--r--Library/Homebrew/exceptions.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/Library/Homebrew/exceptions.rb b/Library/Homebrew/exceptions.rb
index 9ed6646f1..5dd2209b2 100644
--- a/Library/Homebrew/exceptions.rb
+++ b/Library/Homebrew/exceptions.rb
@@ -179,3 +179,11 @@ class ChecksumMismatchError < RuntimeError
super + advice.to_s
end
end
+
+module Homebrew extend self
+ SUDO_BAD_ERRMSG = <<-EOS.undent
+ You can use brew with sudo, but only if the brew executable is owned by root.
+ However, this is both not recommended and completely unsupported so do so at
+ your own risk.
+ EOS
+end