aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bundler.rb
diff options
context:
space:
mode:
authorAndre Arko <andre@arko.net>2013-08-04 13:23:09 -0700
committerAndre Arko <andre@arko.net>2013-08-04 13:23:09 -0700
commit12cb7b81775d52d8fdf40f7724827cf4aac4201b (patch)
tree567933428d7a3aaa116de276acb4e11c3ea075a0 /lib/bundler.rb
parentfd7fdc2f93e8adf3648cf1b6609e358a0ad85c6b (diff)
parent41476e2e10555d89f2a17248297a7d9f4c78ccf4 (diff)
downloadbundler-12cb7b81775d52d8fdf40f7724827cf4aac4201b.tar.gz
Merge pull request #2535 from ixti/issue-1028
Improves sudo propmt
Diffstat (limited to 'lib/bundler.rb')
-rw-r--r--lib/bundler.rb14
1 files changed, 13 insertions, 1 deletions
diff --git a/lib/bundler.rb b/lib/bundler.rb
index cfc645b7..883917cb 100644
--- a/lib/bundler.rb
+++ b/lib/bundler.rb
@@ -293,7 +293,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)