aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2015-04-21 20:46:02 -0400
committerJack Nagel2015-04-21 20:46:02 -0400
commitc8cd720e200749f66f52cd9348d4b109d28bdfdd (patch)
tree6dd207d75e3931e77153900aa020eb1e8b501a40 /Library
parentde5df902f008599d51a16c5ad9bb173e51e1bc42 (diff)
downloadhomebrew-c8cd720e200749f66f52cd9348d4b109d28bdfdd.tar.bz2
Inline error message
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/global.rb6
-rwxr-xr-xLibrary/brew.rb7
2 files changed, 6 insertions, 7 deletions
diff --git a/Library/Homebrew/global.rb b/Library/Homebrew/global.rb
index 556276546..442671518 100644
--- a/Library/Homebrew/global.rb
+++ b/Library/Homebrew/global.rb
@@ -107,9 +107,3 @@ HOMEBREW_PULL_OR_COMMIT_URL_REGEX = %r[https://github\.com/([\w-]+)/homebrew(-[\
require 'compat' unless ARGV.include? "--no-compat" or ENV['HOMEBREW_NO_COMPAT']
ORIGINAL_PATHS = ENV['PATH'].split(File::PATH_SEPARATOR).map{ |p| Pathname.new(p).expand_path rescue nil }.compact.freeze
-
-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
diff --git a/Library/brew.rb b/Library/brew.rb
index 64006cc81..d095744f6 100755
--- a/Library/brew.rb
+++ b/Library/brew.rb
@@ -102,7 +102,12 @@ begin
if sudo_check.include? cmd
if Process.uid.zero? and not File.stat(HOMEBREW_BREW_FILE).uid.zero?
- raise "Cowardly refusing to `sudo brew #{cmd}`\n#{SUDO_BAD_ERRMSG}"
+ raise <<-EOS.undent
+ Cowardly refusing to `sudo brew #{cmd}`
+ 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
end