diff options
author | Andre Arko <andre@arko.net> | 2013-08-04 13:23:09 -0700 |
---|---|---|
committer | Andre Arko <andre@arko.net> | 2013-08-04 13:23:09 -0700 |
commit | 12cb7b81775d52d8fdf40f7724827cf4aac4201b (patch) | |
tree | 567933428d7a3aaa116de276acb4e11c3ea075a0 /lib/bundler.rb | |
parent | fd7fdc2f93e8adf3648cf1b6609e358a0ad85c6b (diff) | |
parent | 41476e2e10555d89f2a17248297a7d9f4c78ccf4 (diff) | |
download | bundler-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.rb | 14 |
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) |