From 52105e60832ba76e2ddcc11f893a85917e2fb1f4 Mon Sep 17 00:00:00 2001 From: Ivan Martinez Date: Mon, 18 May 2020 14:30:19 -0400 Subject: [PATCH] Fix silent internet error in prysm.sh (#5877) * Add check for internet in prysm.sh * Make script fail * End script early * Merge branch 'master' into add-internet-check * Fix order of ops * Merge branch 'add-internet-check' of github.com:prysmaticlabs/prysm into add-internet-check * Merge refs/heads/master into add-internet-check * Merge refs/heads/master into add-internet-check * Merge refs/heads/master into add-internet-check * Merge refs/heads/master into add-internet-check * Merge refs/heads/master into add-internet-check * Merge refs/heads/master into add-internet-check * Merge refs/heads/master into add-internet-check * Add check for internet to bat script * Merge branch 'add-internet-check' of github.com:prysmaticlabs/prysm into add-internet-check * Merge refs/heads/master into add-internet-check --- prysm.bat | 2 +- prysm.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/prysm.bat b/prysm.bat index 88759b64c..79b5d8712 100644 --- a/prysm.bat +++ b/prysm.bat @@ -47,7 +47,7 @@ if %WinOS%==64BIT ( mkdir %wrapper_dir% REM get_prysm_version - Find the latest Prysm version available for download. -for /f %%i in ('curl -s https://prysmaticlabs.com/releases/latest') do set prysm_version=%%i +(for /f %%i in ('curl -f -s https://prysmaticlabs.com/releases/latest%27) do set prysm_version=%%i) || (echo ERROR: Starting prysm requires an internet connection.  && exit /b 1) echo Latest prysm release is %prysm_version%. IF defined USE_PRYSM_VERSION ( echo detected variable USE_PRYSM_VERSION=%USE_PRYSM_VERSION% diff --git a/prysm.sh b/prysm.sh index ab608719a..4050af47b 100755 --- a/prysm.sh +++ b/prysm.sh @@ -107,7 +107,7 @@ function get_prysm_version() { else # Find the latest Prysm version available for download. readonly reason="automatically selected latest available version" - prysm_version=$(curl -s https://prysmaticlabs.com/releases/latest) + prysm_version=$(curl -f -s https://prysmaticlabs.com/releases/latest) || (color "31" "Starting prysm requires an internet connection." && exit 1) readonly prysm_version fi }