Skip to content
Browse files

Add clearer error when/if gpg fails to install (#10228)

  • Loading branch information...
armandfardeau authored and Gargron committed Mar 10, 2019
1 parent 6c0a969 commit b6bc98c480348e4b9e4a57e2e4faafb1403b245f
Showing with 12 additions and 1 deletion.
  1. +12 −1 Vagrantfile
@@ -44,7 +44,18 @@ sudo apt-get install \
# Install rvm
read RUBY_VERSION < .ruby-version
gpg --keyserver hkp:// --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
gpg_command="gpg --keyserver hkp:// --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB"
if [ $? -ne 0 ];then
echo "GPG command failed, This prevented RVM from installing."
echo "Retrying once..." && $($gpg_command)
if [ $? -ne 0 ];then
echo "GPG failed for the second time, please ensure network connectivity."
echo "Exiting..." && exit 1
curl -sSL | bash -s stable --ruby=$RUBY_VERSION
source /home/vagrant/.rvm/scripts/rvm

0 comments on commit b6bc98c

Please sign in to comment.
You can’t perform that action at this time.