diff options
-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 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) |