diff options
author | Armand Fardeau <armandfardeau@users.noreply.github.com> | 2019-03-10 16:00:22 +0100 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2019-03-10 16:00:22 +0100 |
commit | b6bc98c480348e4b9e4a57e2e4faafb1403b245f (patch) | |
tree | 0a47d18a51cb51f48cb37361df9826d3139ccd3a /Vagrantfile | |
parent | 6c0a96912a855561d0bbe757334310bbe4d8d5c8 (diff) |
Add clearer error when/if gpg fails to install (#10228)
Diffstat (limited to 'Vagrantfile')
-rw-r--r-- | Vagrantfile | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/Vagrantfile b/Vagrantfile index f9839fffb9c..c4941f67313 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -44,7 +44,18 @@ sudo apt-get install \ # Install rvm read RUBY_VERSION < .ruby-version -gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB + +gpg_command="gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB" +$($gpg_command) +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 + fi +fi + curl -sSL https://raw.githubusercontent.com/rvm/rvm/stable/binscripts/rvm-installer | bash -s stable --ruby=$RUBY_VERSION source /home/vagrant/.rvm/scripts/rvm |