diff options
author | Aleksey V Zapparov <ixti@member.fsf.org> | 2013-07-11 02:46:43 +0200 |
---|---|---|
committer | Aleksey V Zapparov <ixti@member.fsf.org> | 2013-07-11 02:46:43 +0200 |
commit | 41476e2e10555d89f2a17248297a7d9f4c78ccf4 (patch) | |
tree | cc1f319414cf8a53453c5f920700c7e65a703f13 /lib/bundler.rb | |
parent | ea4ae196a3c519781802a050248c6929ef4229b4 (diff) | |
download | bundler-41476e2e10555d89f2a17248297a7d9f4c78ccf4.tar.gz |
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 969ad8c9..ec1e200a 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) |