Use "sudo -p" with informative prompt instead of echo.

Won't show the prompt if sudo hasn't timed out since
previous authorized sudo activity.
This commit is contained in:
Pavel Repin 2013-03-06 01:18:35 -08:00
parent e9284cd796
commit 53e3c284bb

View file

@ -6,8 +6,8 @@ set -e
# FIX: only sudo if gem home isn't writable
(gem spec bundler -v '~> 1.2.0' > /dev/null 2>&1) ||
(echo "About to install Bundler (you may get a sudo prompt)" &&
sudo gem install bundler -v '~> 1.2.0' --no-rdoc --no-ri)
sudo -p "About to install Bundler, password for sudo: " \
gem install bundler -v '~> 1.2.0' --no-rdoc --no-ri
# We don't want old config hanging around.