module Bundler

def sudo(str)

def sudo(str)
  SUDO_MUTEX.synchronize do
    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
end