summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksey V Zapparov <ixti@member.fsf.org>2013-07-11 02:46:43 +0200
committerAleksey V Zapparov <ixti@member.fsf.org>2013-07-11 02:46:43 +0200
commit41476e2e10555d89f2a17248297a7d9f4c78ccf4 (patch)
treecc1f319414cf8a53453c5f920700c7e65a703f13
parentea4ae196a3c519781802a050248c6929ef4229b4 (diff)
downloadbundler-41476e2e10555d89f2a17248297a7d9f4c78ccf4.tar.gz
Improves sudo propmt
-rw-r--r--lib/bundler.rb14
1 files changed, 13 insertions, 1 deletions
diff --git a/lib/bundler.rb b/lib/bundler.rb
index 969ad8c968..ec1e200a29 100644
--- a/lib/bundler.rb
+++ b/lib/bundler.rb
@@ -286,7 +286,19 @@ module Bundler
end
def sudo(str)
- `sudo -p 'Enter your password to install the bundled RubyGems to your system: ' #{str}`
+ prompt = "\n\n" + <<-PROMPT.gsub(/^ {6}/, '').strip + " "
+ Your user account isn't allowed to install to the system Rubygems.
+ You can cancel this installation and run:
+
+ bundle install --path vendor/bundle
+
+ to install the gems into ./vendor/bundle/, or you can enter your password
+ and install the bundled gems to Rubygems using sudo.
+
+ Password:
+ PROMPT
+
+ `sudo -p "#{prompt}" #{str}`
end
def read_file(file)